Friday, September 19, 2008

Self Hosted: WordPress (multi-site)

Here's how to self-host your WordPress-based blog (oh, and please replace the stuff in red with your own stuff):
  1. install MySQL (e.g. by following the instructions in my previous Gallery2 self-hosting post)
  2. install WordPress
    aptitude install wordpress
  3. read /usr/share/doc/wordpress/README.Debian
  4. create /etc/apache2/sites-available/wordpress.example.com with the following contents:

    <virtualhost *:80>
    ServerName wordpress.example.com
    ServerAdmin webmaster@example.com
    UseCanonicalName Off
    DocumentRoot /var/www/wordpress.example.com
    Options All
    # Store uploads in /var/www/wp-uploads/wordpress.example.com
    RewriteEngine On
    RewriteRule ^/wp-uploads/(.*)$ /var/www/wp-uploads/%{HTTP_HOST}/$1
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log vhost_combined
    </virtualhost>
  5. create a link:
    ln -s /usr/share/wordpress /var/www/wordpress.example.com
  6. enable the new website:
    a2ensite wordpress.example.com
    /etc/init.d/apache2 reload
  7. setup the database with the following magic:
    bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress wordpress.example.com

  8. visit http://wordpress.example.com (your new blog!) and follow yet more instructions...

The Blogosphere awaits!

No comments:

Post a Comment