May
19
Installing Wordpress on Ubuntu 7.10
Filed Under Ubuntu
The idea of this blog is to detail solutions to anything technical I’ve tried that hasn’t been straightforward. What better way to start than with instructions on installing wordpress:
Instructions for Ubuntu 7.10 using bash, but should be similar for any *nix install.
Assuming the following:
- LAMP server already installed,
- Installation is for a single blog,
- The blog should be in the root directory of the website, eg. domain.com,
- The root directory is located in /var/www/
Downloading and extracting the latest version:
sudo su
cd /tmp/
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
mv wordpress/* /var/www/
cd /var/www/
Configuring the mysql database:
mysql -u root -p
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO ‘wordpress’@'localhost’ IDENTIFIED BY ’somepassword’;
FLUSH PRIVILEGES;
EXIT;
Moving the default config file:
mv wp-config-sample.php wp-config.php
nano wp-config
Change it to look like this:
define(’DB_NAME’, ‘wordpress’);
define(’DB_USER’, ‘wordpress’);
define(’DB_PASSWORD’, ’somePassword’);
define(’SECRET_KEY’, ‘make this unique!’);
Next go to yourhostname.com/wp-admin/install.php and follow the steps. Once you have logged in it should take you to a configuration portal and yourhostname.com should be your blog - have fun!
If you get a directory listing instead of a portal, you need to ensure apache is configured to recognise index.php as an index file. Ensure the /etc/apache2/httpd.conf (or the vhost configuration file if you are using one) looks something like this:
DirectoryIndex index.php index.html index.htm
If you had to change this file, you need to reload apache:
/etc/init.d/apache2 reload