Multiple WordPress blogs on a Debian server
This HOWTO assumes:
1. You have a server running at least Debian Etch (or are otherwise able to install the wordpress .deb).
2. Your server has Apache 2, MySQL, and PHP installed.
3. You want to use a single WordPress installation to host multiple blogs across several domains.
Ok, let’s get started.
Step 1: # sudo apt-get install wordpress
Handle a few pesky permissions problems with:
# sudo chown :www-data /etc/wordpress/*
# sudo mkdir /usr/share/wordpress/wp-content/uploads
# sudo chown www-data:www-data /usr/share/wordpress/wp-content/uploads
# sudo chown -R www-data:www-data /usr/share/wordpress/wp-content/themes
Step 2: Set up Apache 2 so that exampledomain.org points to /usr/share/wordpress —Here’s one way, and it also assumes you want www.exampledomain.org to redirect to exampledomain.org. You could modify this to have it redirect to blog.exampledomain.org if you want it to go there instead.
/etc/apache2/sites-available/exampledomain.org<VirtualHost *:80>
ServerName www.exampledomain.org
DocumentRoot /var/www/www.exampledomain.org/
<Directory /var/www/www.exampledomain.org/>
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost><VirtualHost *:80>
ServerName exampledomain.org
DocumentRoot /var/www/exampledomain.org/
<Directory /var/www/exampledomain.org/>
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost># sudo a2ensite exampledomain.org
# sudo /etc/init.d/apache2 reload# sudo ln -s /usr/share/wordpress /var/www/exampledomain.org
/var/www/www.exampledomain.org/.htaccess
Redirect / http://exampledomain.org[Go online and confirm the redirect is working—don't worry that you get a WordPress error. It's not supposed to work yet.]
# cd /usr/share/doc/wordpress/examples
# sudo sh setup-mysql -n exampleuser exampledomain.comNote that the username "exampleuser" must be no more than 16 characters (mysql limitation).
Step 3: Do the normal web-based WordPress install (I suggest going to Options|Miscellaneous and giving each blog a unique subdirectory for its uploads otherwise they’ll all be mixed together) and then repeat step 2 for each additional domain.
You’re done! A single Debian WordPress installation is now hosting multiple blogs!

This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
April 29th, 2007 at 7:05 pm
Thanks for this entry – was very helpful in getting multiple blogs setup on my site!
February 2nd, 2008 at 1:28 pm
I do not understand step 2. My server has a domain name, an internal IP given by my router and an outbound IP given by my ISP. Wich one do I use and where am I supposed to put /usr/share/wordpress/ to have it redirected?
February 20th, 2008 at 1:35 pm
hmm. What did I do wrong I followed the docs exactly and got this error:
benkong2@peter:~$ sudo a2ensite bfdavis.org
Site bfdavis.org installed; run /etc/init.d/apache2 reload to enable.
benkong2@peter:~$ sudo /etc/init.d/apache2 reload
Reloading web server config: apache2Warning: DocumentRoot [/var/www/www.bfdavis.org/] does not exist
Warning: DocumentRoot [/var/www/bfdavis.org/] does not exist
[Wed Feb 20 15:24:39 2008] [error] VirtualHost *:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed Feb 20 15:24:39 2008] [error] VirtualHost *:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
.
September 1st, 2008 at 7:49 pm
# sudo /etc/init.d/apache2 reload
why it not run?
January 22nd, 2009 at 10:17 am
[...] are many guides for installing wordpress locally (official link). For Mac users, there is an official guide as well. You can [...]
January 30th, 2009 at 2:39 pm
I do not understand step 2. My server has a domain name, an internal IP given by my router and an outbound IP given by my ISP. Wich one do I use and where am I supposed to put /usr/share/wordpress/ to have it redirected?
February 16th, 2009 at 8:33 pm
Let me know if you find something that works. I need something like this for another project.
April 15th, 2009 at 1:52 am
I have read it 4 times, still cant make it working well
“NameVirtualHost address is not supported”, ideas?
June 13th, 2009 at 4:42 pm
Thanks for this entry
September 1st, 2009 at 6:56 am
[...] Install WordPress Locally on Debian Etch using .deb (easiest) [...]
September 17th, 2009 at 6:06 am
Is there a limit to home many blogs can be moved and hosted after the changes are made?
October 22nd, 2009 at 4:06 pm
[...] Debian Etch Linux [...]