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 wordpress.com although you will not be able to upload any plugins or custom themes.
Now on to setting up your own WordPress server!
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
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.
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 reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
To create a new database named
CREATE DATABASE wordpress;
Now grant access to
wordpress to user
wordpress with password
GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost" -> IDENTIFIED BY "wordpressPassword";
wp-config.php file to
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');
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/
WordPress is now ready to run its install script. Open your browser and go to
hostname is the name or IP of your server running wordpress.
Follow the instructions on screen.
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.
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
and finally restart
sudo /etc/init.d/proftpd restart