For a potential project I currently have with WordPress, I need to figure out the multisite feature. With WordPress 3, multisite was included with the base install. It only requires a little configuration to get up and running.
The problem is, multisite doesn’t function quite the way I need for this project. Multisite is designed for use in subdomains or subdirectories. In my case, I need it to work with separate domains. There are a couple of ways to make this work. One is to hack things a bit and the other is to use domain mapping. Domain mapping can be expensive in terms of processor, and since these sites I need to implement are somewhat high volume I deceided to focus on the hacking option instead.
There are some directions here for getting multisite running on separate domains. These directions work, but pay careful attention and follow them completely. If you miss a step you may get unexpected results. I missed the step of inserting the new row into the
wp_site table and this resulted with me being unable to log into the second site. Any attempt to log in would just throw you back to the login screen. Inserting that row fixed that problem for me.
There are some caveats to this solution. Under a normal subdomain install, you get a list of sites in the Super Admin panel at the top. With separate domains this list only includes the first site. Something similar happened with a plugin I needed too. I needed the ability to post from one site to another in the multisite install. ThreeWP Broadcast works for this, but under its panel there were no sites listed.
The solution lies in that new row added to
wp_site. In that table, there is a blog id and a site id. I guessed that the lists were showing blogs within one certain site id. For the separate domains to work, they needed to have different site ids. I edited the plugin to remove its reference to site id and the other site showed up in its panel. Since that worked, I looked for references to
site_id within WordPress files and adjusted them similarly.
Now it all works, mostly. The only thing that does not work as I wish is the Super Admin panel does not show in the admin of the second site. I keep referencing the second site, I only have two sites in multisite currently but I believe all subsequent sites will work the same way. I’d like the super admin panel to show for all super admins no matter which site they are logged in on. I haven’t looked into this too much yet as it would be nice but is not needed for the sites to function.
Now that multisite is working with domains, I have two other issues to work through for this project. The first will be bringing in data from a legacy system into WordPress. The second is integrating VBulletin into WordPress with multisite. Good times ahead!