The following tutorial has been tested & written on Ubuntu 14.04 LTS running in an Oracle Virtual Machine. The reason i stage this way is to keep my machine as clutter free as possible. When you are not using it, the VM is simply shutdown!
Steps I have taken to set up a Dev WordPress site on my Local Network (Actually Ubuntu Server running in a Virtual Machine), however the following could just as easily be applied to the Raspberry Pi (LAMP installation would be necessary and outside the scope of this tutorial). At present the following has only been tested on Ubuntu Sever.
– Referenced heavily from the WordPress Codex
- Log into terminal as
- Make sure you install Ubuntu with SSH & LAMP options enabled
- – Set the MySQL password to something memorable & secure. This wil become the MySQL ‘root’ password.
First you have to set up a MySQL user and grant necessary privileges.
Log in to MySQL on the command line using
mysql -u root -p where the password is that of what you set upon install.
CREATE DATABASE wordpress;
CREATE USER wpuser@localhost IDENTIFIED BY 'password';
// Make sure the apostrophe stays around the password
GRANT ALL PRIVILEGES ON wordpress.* TO "wpuser"@"localhost" IDENTIFIED BY "password";
Make sure the ‘password’ fields above are changed to something memorable & secure. Good habit, even on a local install.
Download the latest version of WordPress to your web directory (
tar xvfz latest.tar.gz
As a final step you need to grant Apache privileges for the newly created
wordpress folder. Failure to do this will result in the following install to fail.
sudo chown -R www-data:www-data /var/www/html/wordpress
Obviously if you are already running as
root you can omit the sudo, however just a quick explanation of what the above command is doing for those not so clued up reading this tutorial. (We all need to start somewhere!)
chown) Is a Linux command to change ownership of a file / folder.
-R) As we are working with a directory, this applies the command recursively.
www-data:www-data) Changes owner to user of group (
/var/www/html/wordpress) The directory / file we are sighting.
Now the WordPress installation is on the server, we can navigate to
'server'/wordpress/ in a web browser and follow the famous five minute install. Remember the name of the MySQL database and user you set up previously. WordPress will give you options if any of the above steps fail.. Particularly permissions.
Following the installation completion, with any luck you should be up and running!