LinuxMoz

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:

1
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

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

Create the MySQL Databases for Wordpress on Ubuntu:

1
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 linuxmoz.com

Example:

1
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n linuxmoz_db linuxmoz.com

Restart Apache:

1
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).

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

Point your browser at https://localhost/wordpress or https://yourdomain.com/wordpress 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.

Comments