Multiple domains on one WP network installation

Setting up a new WordPress Network is from version 3.0 very simple and done within 5 min. To set this up so you can use multiple domains to your network blogs is no biggie that either. But what if you want to have multiple domains pointed to the main blog/network and not the sub blogs? Not that easy.

Lets start with how we want the url structure:

So, how do we manage to get this with just one (1) WordPress Network installation. Problem we thought at first, but after hours of searching, testing domain mapping plugins and asking in forums we found a solution. The plugin Networks for WordPress solved all the problems.

With this plugin you can create several WordPress networks with just one WordPress installation, perfect! 🙂 And it is very easy to install and use. Here are how you proceed.

Point all the domains right

First of we need to point all the domain names we want to use to the same place. This is done with virtual hosts in Apache. I’m using a local installation for this guide

<VirtualHost *:80>
DocumentRoot "/Users/mattias/Sites/Earthpeople/site"

After that is done, restart the Apache server.

Install WordPress and create a WordPress Network

I’m not going to go through this, but here you have a guide for settings up a WP Network.

Setup the Networks for WordPress

First of, install the plugin Networks for WordPress via the Network Admin -> Plugins page. When done you get a new option in the Sites menu named “Networks”. Go there and you will see this page.

Next step is to create all the new networks we need to get all our domains to work.

Network name: The name of the network, can be anything and you can change this at any time.
Domain: Here, put in the domain you want for the network, eg
Path: Must be / for this to work
Create a Root site: Leave this checked.
Root site name: This will be the name of you root site, can be anything and you can change this at any time.
New network Preview: Before adding the network, click the “Check Network Settings”, if all checks is green everything is good and you can create the network. If you get a red status here, something is wrong in your Apache vhost settings.

Assigning the blogs

When all the networks we need are created, hover one of the networks in the list and click the “assign sites” link. This will take you to a new page where you select what blog should belong to what network. Repeat this step for all networks and you are almost done.

Get blogs pages and post to work

At first it’s easy to think that this don’t work due to that you can’t access a blogs single posts page or regular pages. You get a 404 page don’t exist error. This is easy fixed. Just go to the dashboard for the blog and update the permalink structure. Yes, this needs to be done on every single blog manually. When done, you have a multiple network site using just one installation of WordPress. This will save you a lot of time and work in the future when managing your network.

Some things to remember thou. Every network has its own dashboard and network admin page so you can have plugins and themes separated from each network. If you want a plugin to be on all networks, install it in the mu-plugins folder.

/ Mattias & Hjalmar