Enable WordPress Multisite with Subdomains (HostGator)
After a bit of tinkering I have gotten WordPress multisite to work on a HostGator server setup. I am running WordPress 3.0 RC3.
After some simple editing on the wp-config.php file and the .htaccess file I added a wildcard DNS by adding a subdomain with just an asterix * and that allows WordPress to create the subdomains for multisite. Here is how to get it to work…
Step 1
Login to cPanel (something like .com/cpanel ) Go to subdomains and add one with just an asterix.

Step 2
Add this into wp-config.php to enable multisite.
define('WP_ALLOW_MULTISITE', true);
Step 3
Login to your WordPress dashboard and go to Tools>>Network (.com/wp-admin/network.php) You will then see the following type of instructions.
Step 4
Add a directory named blogs.dir to the wp-content directory. It should look like /public_html/wp-content/blogs.dir
The CHMOD write permissions should be something like 755 to allow the server to write to the directory.
Step 5
Add what they tell you to add into the wp-config.php file
Mine looked like this:
define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'limecuda.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );
Make sure that SUBDOMAIN_INSTALL is set at true.
Step 6
Add what they tell you to add into the .htaccess file.
Mine looked like this:
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
Step 7
I don’t know. Go start adding some sites on to your install. :)
Any questions?





I’ve done all this, but I’m not having any luck mapping domains to the ‘child’ sites I create. Any input?
I have a “baby plan” with Hostgator. I created a main domain (the name that created the Hostgator account), plus 10 “add-on” domains, and installed WordPress on each of them. I point my godaddy domains to Hostgator’s name servers (DNS), and I am in business.
Now, instead of installing wordpress to each of my 11 websites. I only want to install it to the main one, and then enabling wordpress multisite to manage all of them.
My question: Do I need to remove (undo) the 10 “add-on” domains before I attempt to enabling wordpress multisite?
Yes, you should remove them and then you will need to add a * as a subdomain to act as the wildcard for WordPress to create those sites.
Hi,
I have a dedi server with Hostgator. I have done all the steps as above. The site descargarpelicula.net resolves fine…but then after sometime just stops, and is only accessable via descargarpelicula.clickmember.net
If I delete the addon domain for descargarepelica.net it works for about 2 hours and then stops. When I add the “addon” domain back it works again…but also for about 2 hours.
Whats going on?
Thanks for the info!
p.s. the image at Step 1 isn’t working…
I would get on live chat with HostGator and see what they tell you. That is very buggy.
Thanks for the heads-up on the image. I seem to have just lost a bunch of images inexplicably :(
Which HostGator plan are you using? Will this work on hatchling or baby?
Oh and that image is still not working.
@Ewergren I have a reseller account with them but any of their plans should do this.
I also replace the image. Thanks.
In hostgator’s baby plan, when an addon domain is created using the cPanel, cPanel automatically also creates a subdomain (addondomain.primarydomain.com) in addition to the independent addondomain.com, (it looks like the extra subdomain ie. addondomain.primarydomain.com just to function like to ‘bridge’ user access to the addon domain that located at the root of the primary domain public_html but as an independent domain), so, if I install ‘WP 3.0 multisite’ on my primary site and another independent ‘single WP 3.0′ on my addon domain site, while when I follow above, I also would have an (asterix)*.primarydomain.com subdomain, will both my multisite WP installed on my primarydomain.com and it related virtual subdomain sites, and independent single WP on my addondomain.com function well? And the (asterix) *.primarydomain.com will not harm/mess up the single independent WP 3.0 installed on my addondomain.com ?
@Michael that sounds pretty complicated and I don’t know offhand without testing. I would imagine it would be fine as long as one of the subdomains created by multisite isn’t named the same as the addon domain. If this is a potential issue then when cPanel is creating the subdomain/directory that foes in the root I would suggest adding some random characters into it.
I had the same problem. I first tried installing wordpress network on an addon domain but I couldn’t get it to work. So i tried it using the primary domain and it worked.
Having a network on the primarydomain, using a *.primarydomain.com wildcard won’t affect your regular blogs (or sites) that are added in hostgator.
Note: When creating the wildcard subdomain for addon domains STEP 1. you need to add the correct document root path
eg: public_html/yoursubdomain.com/
I just started using Multisite today. I am having issues creating new sites. It creates some of them, like “test.mydomain.com” but not others (for example, “testblog.mydomain.com”). I removed the banned signup words, so I don’t know what is preventing any site I create from working. All it shows is a “Problem loading page” error (in Firefox) for certain domains I try to make. Do you know why this is happening?
I’m on hostgator’s baby plan with WordPress 3.1.4