Installing WordPress on an Azure Ubuntu VM – Part 4

Part 1 – Deploy an Azure Ubuntu VM
Part 2 – Install LAMP on the VM
Part 3 – Install and configure WordPress
Part 4 – Fixing the “quirks”

Part 4 – Fixing the “quirks”

Left as is WordPress will work, however there are a few “Quirks” to be aware of:

  1. Email notifications will not work
  2. Permalinks will not work.
  3. updates will require ftp details

Fix the email notification issue

To fix the email issue you will need to install Postfix do this by running the following command:

sudo apt-get install mailutils

There are several ways to configure Postfix however the way to configure it for the server in this case is to set it up as an Internet Site:

clip_image001

clip_image002

Specify the domain name that will be used:

clip_image003

Then edit the /etc/postfix/main.cf file:

sudo nano /etc/postfix/mail.cf

clip_image004

Ensure that the inet_interfaces is set to = localhost

Press Ctrl+X to save and exit:

clip_image005

Restart the Postfix service by running:

sudo service postfix restart

WordPress can then send email notifications. Please add the public IP Address of your WordPress site to your SPF Record as you will possibly have some mail delivery issues as mail filters may well pick it up as Spoofing.

Now this may not fix your mail sending issues as some Azure Subscriptions do not allow you to send email on Port 25 and you will be required to send email via SendGrid or by a 3rd party plug in.

Fix the Permalinks

Now depending on the build of WordPress and Ubuntu Permalinks may not work and when you change the Permalink settings you will most likely get this error when you click on a post and it uses the friendly name:

clip_image006

This is a simple fix you will need to make a change to the site config (if not already in there) and enable mod rewrite.

Run:

 sudo a2enmod rewrite

This will enable the rewrite module, then edit the conf file and add the following before </Virtualhost> (if its not been added already):

<Directory /var/www/allthings365.co.uk/>
AllowOverride All
</Directory>

clip_image007

Once done save and exit and then run:

sudo service apache2 restart

Jobs a good’un it will the enable PermaLinks to work.

Stop being prompted for FTP Details when updating

Another issue is that when you go to install an update, a new theme or update a plug in you may well receive the following:

clip_image008

The fix for this is to run the following command

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

When you next go to update/install a plugin/theme you will not be prompted for connection details!

And that is it you now how a fully functioning Ubuntu LAMP server running your own WordPress blog

Leave Comment

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