RaspberryPi WordPress


You see the result here ūüėČ From Performance viewpoints I can trustfully say that the RaspberryPi 2 has enough resources to manage Apache server, mysql and¬†ownCloud – my current setup.

Here is my webserver:


And now to the main task: installing a WordPress blog!

First of all – if you haven’t done it yet – install the following packages:

>> apt-get install apache2 mysqlserver

During the installation you will be asked for a mysql password, you will need it later in the ‘creating the database’ subsection. More Information concerning the Apache webserver can be found here.

  • Go to the WordPress site, download the zip-file and store it on your RaspberryPi or download it directly:
    >> cd /var/www
    >> wget http://wordpress.org/latest.zip
    >> mv latest.zip wordpress.zip
  • Move¬†and extract¬†the file¬†in the Apache web directory:
    >> mv wordpress.zip /var/www/
    >> cd /var/www
    >> unzip wordpress.zip
    >> chown -R www-data:www-data wordpress/
  • The next step is creating the database:
    >> mysql -u root -p
    >> Enter password: MYSQLPASSWORD
    >> CREATE DATABASE wordpress;
    >> CREATE USER  'wordpress'@'localhost' IDENTIFIED BY 'userpassword';
    >> GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@'localhost' IDENTIFIED BY 'userpassword';
    >> flush privileges;
    >> exit;
  • Now open your webbrowser and type in the following URL (depends on the name of your RaspberryPi which has been set via the main RaspberryPi setup): http://raspberrypi/wordpress/
  • You should now see the wordpress configuration site, there you should follow the installation wizard.Database: wordpress
    User: wordpress
    Password: your set password
    Host: localhost
  • Congratulation! You have successfully installed WordPress!

Usefull hints:

  • for directory browsing in the command shell I use the MidnightCommander. I also prefer the internal editor which can be found in the configuration menu.
    >> apt-get install mc
    >> mc
  • Change the default webpage directory of your Apache webserver:>> mcBrowse to /etc/apache2/sites-available/Open default [press F4] and change the following paramters:
    DocumentRoot /var/www/wordpress
    <Directory /var/www/wordpress>
  • Save and close the file [F10] Restart the webserver. It should look like this:


  • Restarting the Apache webserver
    >> service apache2 restart

Congratulation! You have successfully installed WordPress!

Leave a Reply