Linux Stuff && Coffee

How to Install Wordpress on Ubuntu 12.04 LTS

| Comments

The articles explains how to install Wordpress on Ubuntu 12.04, to instructions are step by step and I use the latest version of Wordpress using the .dpkg package from apt.

To start off with install install the Ubuntu Wordpress package with:

apt-get install wordpress php5-gd

This should pull down and install everything you need to install Wordpress on Ubuntu, the wp files are installed into the /var/share directory you need to link them and make sure the perms are set correctly.

Create a symlink from /var/share/wordpress to /var/www/wordpress

sudo ln -s /usr/share/wordpress /var/www/wordpress

Create the MySQL Databases for Wordpress on Ubuntu:

sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost

**Note the -n wordpress should be replaced with the name of your database (unless you want to call it wordpress) and the domain should be changed to your real world domain e.g


sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n linuxmoz_db

Restart Apache:

service apache2 restart

Set the perms for Wordpress or the install and autoupdates will not work (make sure you keep Wordpress up to date or you will get hacked).

chown -R www-data /usr/share/wordpress

Point your browser at https://localhost/wordpress or and follow the on screen instructions.

After configuration you should be good to go, make sure you update Wordpress after the installation as I suspect the package version will be out of date.

If you are using friendly URL’s then remember to enable mod_rewite on Ubuntu.