Note: This is a follow up to the original Make Money With a Poor Mans BANS (Build A Niche Store) post. If you haven't read that post, please do so before continuing with this one.
Robert made a fantastic suggestion in the original Poor Mans BANS post. After deploying several Poor Mans BANS sites, maintaining and upgrading each site soon became a cause for concern. Thanks to Robert's suggestion, that's no longer an issue.
Here's an excerpt from the post Robert kindly shared:
Stephen Rider [striderweb.com] has released a modification for WordPress that allows you to run multiple blogs off of a single WordPress installation.
See where this is going? This awesome modification has an easy to use configuration system that enabled me to convert all of my Poor Mans BANS sites over to a single Wordpress installation in less than 10 minutes. Here's a run down of the details and steps involved.
Before - 5 domains, 5 separate Wordpress installations
-
www.domain-1.com --> /var/www/domain-1.com/http/
-
www.domain-2.com --> /var/www/domain-2.com/http/
-
www.domain-3.com --> /var/www/domain-3.com/http/
-
www.domain-4.com --> /var/www/domain-4.com/http/
-
www.domain-5.com --> /var/www/domain-5.com/http/
After - 5 domains, 1 Wordpress installation
-
www.domain-1.com --> /var/www/virtual-press/http/
-
www.domain-2.com --> /var/www/virtual-press/http/
-
www.domain-3.com --> /var/www/virtual-press/http/
-
www.domain-4.com --> /var/www/virtual-press/http/
-
www.domain-5.com --> /var/www/virtual-press/http/
5 domains, 1 folder to maintain, perfect. So here's how it's done. First, download the mod from Stephen's web-site. Extract the contents of the archive to the base (core) Wordpress installation /wp-contents/ folder.
You should now have something similar to:
/var/www/virtual-press/http/wp-contents/multiblog/
Inside the /multiblog/ folder is another directory labeled config. This is where the magic happens.
Open up the file config/mb-users.php in your favorite text editor. A vusers[] entry is needed for each domain you intend on serving from the single Wordpress install. Here's an example mb-users.php file:
<?php
if ( !defined('ABSPATH') ) exit(); // sanity check
$vusers[] = 'domain-1.com';
$vusers[] = 'domain-2.com';
$vusers[] = 'domain-3.com';
$vusers[] = 'domain-4.com';
$vusers[] = 'domain-5.com';
$mydomain = '';
?>
So far so good, right? Now, open up config/mb-config-sample.php. The contents of this file should look familiar to Wordpress users. Insert the database information for domain-1.com and save the file in the following format:
mb-config-domain_1_com.phpIf the domain was www.elite-ebay-power-seller. com, you must save the file like this:
mb-config-elite_ebay_power_seller_com.php
If you're unable to use these examples to determine what's right for your domain, let me know in the comments below and I'll try to help out. Repeat this process for all your domains. Based of the conditions outlined in this post, the /wp-content/multiblog/config/ file listing should now look like this:
mb-config-domain_1_com.php mb-config-domain_2_com.php mb-config-domain_3_com.php mb-config-domain_4_com.php mb-config-domain_5_com.php mb-users.php mb-autoconfig.php
Ok, we're almost done. The last step is updating your http daemon's settings. You must tell your http server to point all those domains to the base Wordpress directory.
Here's how this is accomplished with Lighttpd (lighttpd.conf):
$HTTP["host"] =~ "www.domain-1.com|www.domain-2.com|etc..|etc..." {
server.document-root = "/var/www/virtual-press/http"
}
Restart your http daemon so the new settings will take effect. If all goes well, your sites should function properly with the exception of maybe some plugins and themes. This is easily resolved by copying them over from the original document root to the new base installation (which is the new document root).
In my case, a couple of my sites used the same theme but with a different header/logo. To prevent domain-1.com from displaying domain-2.com's logo, I simply made a copy of the theme to isolate the files.
/var/www/virtual-press/html/wp-content/themes/themeA-domain1.com/ /var/www/virtual-press/html/wp-content/themes/themeA-domain2.com/
Login to the admin panel and select the appropriate theme for the domain. This will keep your Analytics, Adsense, and graphics in order. That's it!
My gratitude goes out to Robert for sharing this wonderful modification and Stephen for writing it. If you enjoyed reading this post and would like to read more like it, please consider subscribing to my full length RSS feed. And as always, comments are encouraged.
Word Count: 888


