Map any blog/site on a WordPressMU or WordPress 3.X network to an external domain.
WordPress MU Domain Mapping Download Now
(If the link does not work)↓
Originals Link WordPress.org
How to Install WordPress MU Domain Mapping Plugin, Manually
- Install the plugin in the usual way into the regular WordPress plugins folder. Network activate the plugin.
- Move sunrise.php into wp-content/. If there is a sunrise.php there already, you’ll just have to merge them as best you can.
- Edit wp-config.php and uncomment or add the SUNRISE definition line. If it does not exist please ensure it’s on the line above the last “require_once” command.
define( 'SUNRISE', 'on' );
- As a “super admin”, visit Super Admin->Domain Mapping to create the domain mapping database table and set the server IP address or a domain to point CNAME records at.
- Make sure the default Apache virtual host points at your WordPress MU site or WordPress 3.0 network so it will handle unknown domains correctly. On some hosts you may be required to get a dedicated IP address. A quick check: in a web broswer, type in the IP address of your install. If you are using CPanel, use the Park a Domain menu to set the mapped domain to your main installtion.
- Do not define COOKIE_DOMAIN in your wp-config.php as it conflicts with logins on your mapped domains.
Illustrated installation instructions can be found here but you can ignore the instructions to place domain_mapping.php in mu-plugins. Thanks Otto.
On Super Admin->Domain Mapping you can configure the following settings:
- “Remote Login” can be disabled. Useful if you’re hosting totally separate websites.
- “Permanent redirect” uses a 301 redirect rather than 302 to send visitors to your domain mapped site.
- “User domain mapping page” allows you to disable Settings->Domain Mapping that the user uses.
- “Redirect administration pages to network’s original domain (remote login disabled if this redirect is disabled)” – with this checked, if a user visits their dashboard on a mapped domain it will redirect to the dashboard on the non mapped domain. If you don’t want this, remote login will be disabled for security reasons.
- “Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.” – ignore the primary domain setting on your sites. The same content will be available on multiple domains and may cause problems with Google because of duplicate content issues.
Super Admin->Domains allows you to edit the domains mapped to any sites on your network.
For Cpanel users
If your domain uses the nameservers on your hosting account you should follow these instructions. If the nameservers are elsewhere change the A record or CNAME as documented above.
Add a wildcard subdomain/virtual host record to your site’s DNS record in Web Host Manager (WHM). If you do not have access to WHM, you must email your web host and ask them to make this one change for you. Should be no problem:
- Go to “Edit DNS Zone” and select the domain of your WPMU installation and click “Edit”.
- Below “Add New Entries Below This Line”, enter in the first box (Domain) an asterisk: “*”.
- The second box, TTL, should be “14400”.
- The third box should be “IN”.
- Select A Record Type from the drop down “A”.
- And in the last box, paste in the IP address of your website/network.
From Cpanel, click on the “Parked Domains” under the “Domains” section:
- Under “Create a New Parked Domain” enter the domain name you want to add to your network.
- Click the “Add Domain” button.
- It should add the domain to the list of parked domains and under “Redirect to” it will say “not redirected”. That is OKAY.
Now you’re ready to do your domain mapping.
Plugin Not Working?
If any errors or problems with the plug-in then write comments.