Azure Ubuntu and WordPress – Part 3

This is part 3 of a 4 part mini series “How To” for configuring WordPress on Ubuntu which is hosted in Microsoft Azure.

The 4 Parts are broken in to the following sections:

Part 1 – Deploying Ubuntu on Microsoft Azure
Part 2 – Configuring LAMP on Ubuntu
Part 3 – Install and Configuring WordPress on Ubuntu
Part 4 – Trouble shooting the common issues

Install and Configuring WordPress on Ubuntu

So, in part 1 we looked at deploying a Ubuntu Server on Microsoft Azure and part 2 we looked at deploying and configuring LAMP on Ubuntu. In part 3 we will look at installing and configuring WordPress on the server so you can then host your very own blog on there.

There are a few ways to install WordPress on Ubuntu however the way I like to do it is to download the latest build from http://wordpress.org to the Ubuntu Server extract the files to the folder you created for the website and go from there. So lets get cracking…

Firstly create the folder as to where WordPress will be installed to:

sudo mkdir -p /var/www/allthings365.co.uk

The set the permissions on the new folder:

sudo chown -R $USER:$USER /var/www/allthings365.co.uk
sudo chmod -R 755 /var/www

 

This next permission is to enable the ability so you can write the wp-config.php file when it comes to configuring WordPress. Once WordPress is configured it is recommneded to set the permissions back to 757 for the folder

sudo chmod 757 /var/www/allthings365.co.uk

clip_image001

Then get the lates build of WordPress and extract to the newly created folder:

wget -c http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
sudo rsync -av wordpress/* /var/www/allthings365.co.uk

Next Create the Database:

mysql -u root -p<br />CREATE DATABASE wordpress;
CREATE USER wordpressuser@localhost IDENTIFIED BY 'Pa55w0rd';
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost;
FLUSH PRIVILEGES;
Exit

Create the Website:

sudo nano /etc/apache2/sites-available/allthings365.co.uk.conf
<VirtualHost *:80>
    ServerAdmin admin@althings365.co.uk
    ServerName allthings365.co.uk
    ServerAlias www.allthings365.co.uk
    DocumentRoot /var/www/allthings365.co.uk
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

 

clip_image002

Ctrl+X

clip_image003

sudo a2ensite allthings365.co.uk.conf

Sudo service apache2 reload

Update DNS/Host File so that you can browse to the site:

clip_image004

clip_image005

clip_image006

clip_image007

clip_image008

clip_image009

clip_image010

Lastly

change the permissions for the root folder to 755:

sudo chmod 755 /var/www/allthings365.co.uk

 

 

Leave Comment

Your email address will not be published. Required fields are marked *