23) Installing WordPress onto Raspberry Pi

<-- Previous    Next –>

Installing WordPress should be straight forward and should follow the normal method now that you have PHP, Apache and MySQL setup.

Downloading The latest version of WordPress

You can download WordPress from wordpress.org using the wget command.

The latest version of WordPress is always available at wordpress.org/latest.tar.gz, so you can grab the latest version without having to look it up on the website.

If you are using the USB stick as described in a previous section, the web site will be located at /websites/www/html/ other wise it will be located at /var/www/html/

Change directory to /websites/www/html/ and delete all the files in that directory:

cd /websites/www/html/
sudo rm *

Download WordPress using wget.

sudo wget http://wordpress.org/latest.tar.gz

Extract the WordPress tarball to get at the WordPress files.

sudo tar xzf latest.tar.gz

Move the contents of the extracted wordpress directory to the current directory.

sudo mv wordpress/* .

Tidy up by removing the tarball and the now empty wordpress directory.

sudo rm -rf wordpress latest.tar.gz

Running the ls or tree -L 1 command now will show you the contents of a WordPress project.

These files and folder make up your WordPress installation.

You should now change the ownership of all these files to the Apache user:

sudo chown -R www-data: .

Now if we go to a browser and enter http://hostname where hostname is the name you have given to the web server, you should be presented with the installation screen of WordPress. We cannot go any further at this stage because we have not created the database for WordPress. If you do not see the WordPress installation screen, it may be because you have not changed the Apache settings as described in one of the previous pages.

<-- Previous    Next –>