WordPress can be manually installed by downloading the .tar.gz available at the WordPress.org official website, and uncompressing it inside /var/www (or a sub-folder).
Alternatively, the package wordpress is available through the universe repositories. Use any method to install the package, such as the Software Center, or running apt-get install from a terminal:
sudo apt-get install wordpress
The installation places the files in the /usr/share/wordpress folder. So that Apache2 knows where to find the installation folder, make a symbolic link to the Apache2 www folder:
sudo ln -s /usr/share/wordpress /var/www/wordpress
Before running the mysql script described below you need to install MySQL if you don't have it yet:
sudo apt-get install mysql-server
Then uncompress and install WordPress using the supplied script:
sudo gzip -d /usr/share/doc/wordpress/examples/setup-mysql.gz sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
This script creates the MySQL database and user wordpress for the new MySQL database named localhost (that will be used for WordPress). If you will be hosting a virtual host and/or already know your URL, it is best to name your database the same as your URL. Also if you plan on hosting multiple blogs with different virtual hosts, each needs a differently named database, which would be achieved in the same way. For example, if your URL is wordpress.mydomain.org, then the command would be
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress_mydomain_org wordpress.mydomain.org
If you will be using a virtual host, create your apache2 virtual host file in the /etc/apache2/sites-available folder. When you are finished, enable it by making a symbolic link from that virtual host file to the sites-enabled folder. However, this can be dangerous until you have secured your WordPress installation against malicious anonymous users on the Internet, so should only be done after the initial installation is complete and anonymous user creation is turned off. Whenever you change your virtual hosts, you must restart Apache2:
sudo /etc/init.d/apache2 restart
Now, browse to "http://localhost/wordpress" in your browser (or http://''wordpress.mydomain.org''/wordpress if you are using a virtual host), and proceed with the Wordpress "five minute installation process", which will allow you to set up the first administrator account.