Preparing the System

On Gentoo

emerge

On Debian/Ubuntu

apt-get install ack-grep git unzip
apt-get install apache2 apache2-mpm-prefork
apt-get install libapache2-mod-php5 php5-mysql
apt-get install php5-memcached php5-mysql php5-redis redis-server redis-tools
apt-get install mysql-server mysql-client

Configuring Apache

We've got a sort of tuned up Apache configuration for a dedicated WP site /pub/apache-wordpress.conf.

Preparing the MySQL Server

Create a user with proper username, hostname and password identifiers. You can use the IP address or the RDNS name for this host, or wildcards

mysql -uroot

mysql> CREATE USER '$user'@'$host' IDENTIFIED BY '$pass';
mysql> CREATE USER '$user'@'10.0.0.10' IDENTIFIED BY '$pass';
mysql> CREATE USER '$user'@'%' IDENTIFIED BY '$pass';

Create the database

mysql> CREATE DATABASE wordpress;

Grant the permissions

mysql> GRANT ALL ON wordpress.* TO 'edoceo'@'192.168.158.168';

Installing WordPress

cd /opt/wordpress


Wordpress on Lighttpd

$HTTP["host"] == "example.com" {
    server.error-handler-404 = "/index.php"
}

Wordpress FTP Self-Access

I usually do all my WP work via command line. Not a luxury everyone has; or maybe you want to configure the WP so that it can be update automatically or by a non-sys-admin. I don't like to expose FTP to the outside world, so here we have WP access itself via localhost FTP.

We assume Wordpress is installed to /var/www/wordpress and is owned by the same user the webserver does (Apache)

  1. Configure Pure-FTPd.
  2. Add a new user to Pure-FTP pure-pw useradd WPSITE -u apache -g apache -d /var/www/wordpress
  3. Update Ownership chown -R apache:apache /var/www/wordpress
  4. Lockdown a few things chown root:root /wp-config.php

Now, you can vist the upgrade pages for your Wordpress install. When it prompts for the username/password just enter what you created above.

See Also