Installing WordPress 3.0.1 on Ubuntu Server 10.10


WordPress is a web application for blogging or creating your own website.
If you want to try it out without installing anything on your server yet, you can create your own blog for free at although you will not be able to upload any plugins or custom themes.

Now on to setting up your own WordPress server!

Step 1:

The wordpress package is available in the ubuntu repositories so all you have to do to get wordpress on your server is:

sudo apt-get install wordpress

This will install all needed dependencies like apache2 and mysql. During the installation of mysql apt will ask you to set a root password for your mysql server. You will need this password later on.

Step 2:

WordPress needs a mysql database and username to store its data.
Open a shell and type

mysql -u root -p

and supply the password you entered during the mysql-install.
You should see something like this:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1093
Server version: 5.1.49-1ubuntu8 (Ubuntu)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights
This software comes with ABSOLUTELY NO WARRANTY. This is free
and you are welcome to modify and redistribute it under the GPL v2

Type 'help;' or '\h' for help. Type '\c' to clear the current input


To create a new database named wordpress enter:


Now grant access to wordpress to user wordpress with password wordpressPassword:

GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost"
-> IDENTIFIED BY "wordpressPassword";

Step 3:

Copy the wp-config.php file to /etc/wordpress with

cd /usr/share/wordpress
sudo cp wp-config-sample.php /etc/wordpress/wp-config.php

and edit the file with your preferred editor

sudo nano /etc/wordpress/wp-config.php

You will need to enter your database information. Find the following section and enter your data accordingly:

/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpress');

/** MySQL database password */
define('DB_PASSWORD', 'wordpressPassword');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Step 4:

You will need to make a symbolic link to your wordpress root in /var/www/ which is your apache2 web root. You can do this by entering:

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

Step 5:

WordPress is now ready to run its install script. Open your browser and go to


where hostname is the name or IP of your server running wordpress.
Follow the instructions on screen.

Step 6:

For wordpress to be able to install plugins you need to grant it access over FTP. In this tutorial I’ll be using proftpd, but you may use any FTP-Server.
Install proftpd by entering:

sudo apt-get install proftpd

and make it standalone when prompted.
Next edit the config-file with:

sudo nano /etc/proftpd/proftpd.conf

and append the line

DefaultRoot     /var/www/wordpress

and finally restart proftpd with:

sudo /etc/init.d/proftpd restart
This entry was posted in Linux and tagged , . Bookmark the permalink.