Call + (44) 0843 289 4539

  • No products in the cart.

Install WordPress ubuntu Desktop

Developing functionality for WordPress will require you to set up a local development instance. Unless you want to be a cowboy and do everything live straight on your production server!

It is possible to set up WordPress on any of the leading operating systems i.e. Windows, Mac and Linux. However our favourite operating systems are  Ubuntu Linux and Mac OSX.

How to install WordPress on Ubuntu for local development

In this tutorial we’ll walk you through setting up a simple development environment on ubuntu desktop..

WordPress typically runs on the LAMP stack, (Linux , Apache, MySql and PHP), so you will first need to install the LAMP stack on your Ubuntu Desktop .

Once you have completed the installing the LAMP stack,  need to do some basic checks. First we’ll want to check the version of PHP.

We’ll first create a new PHP file to get the info

sudo touch /var/www/html/info.php

Open the file in your favourite text editor. We’ll use nano

sudo nano /var/www/html/info.php

Then add this simple PHP script

<?php phpinfo();

The Ctrl + x to exit and save

The open up your browser and navigate to http://localhost/info.php you should see a page similar too:

PHP Info

It’s also advisable to follow Best Practices and Secure your mySQL installation:

sudo /usr/bin/mysql_secure_installation

Follow the instructions and REMEMBER THE PASSWORD!  We’re going to use it shortly.

Next we’re going create the mySQL database for our WordPress

mysql -u root -p

You’ll be asked for the password

Now create the database

create database wordpress;

Now we can exit ( ctrl + c )

Now we need to do some configuration on the Web Server to get ready to install WordPress

We’ll need to give Apache access to the HTML directory:

sudo chown -R www-data:www-data /var/www/.

Then add your username to the Apache group

sudo usermod -a -G www-data YOURUSERNAME

For all the too take effect you will now need to login and logour or simply reboot

sudo reboot

We will now nee to set read/write/execute permissions for the Apache group

sudo chmod -R 775 /var/www/.

We’re now Ready to download and  install WordPress

Download the latest copy of WordPRess


Extract it
tar -xvzf latest.tar.gz

Delete the Index.html from the apache folder

rm -f /var/www/html/index.html

Now move the extracted files to Apache Folder

sudo mv wordpress/* /var/www/html/

Change ownership on the directory

sudo chown -R www-data:www-data /var/www/.

If you go to http://localhost/wordpress You should see the installation Wizard.
It’s now just a case of clicking “Create Configuration File” then “Let’s go” and entering appropriate details

Follow Me

Gary Woodfine

Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.
Follow Me