WordPress MU Domain Mapping
This plugin allows users of a WordPress MU site or WordPress 3.0 arrangement to map their blog/site to another meadow.
It requires manual installation as one file must be copied to wp-content/. As upgrading the plugin, remember to update domain_mapping.php and sunrise.php. Full instructions are on the Installation page and are reasonably straightforward to follow. You must also read this page too.
Super administrators must configure the plugin in Super Admin->Meadow Mapping. You must enter the IP or IP addresses (comma deliminated) of your server on this page. The addresses are purely for documentation purposes so the user knows what they are (so users can set up their DNS correctly). They do nothing special in the plugin, they’re single printed for the user to see.
You may also mark out a CNAME on this page. It will most likely be the meadow name of your arrangement. See below for some restrictions and warnings.
Your users must go to Tools->Meadow Mapping everywhere they can add or rub out domains. One meadow must be set as the fundamental meadow for the blog. As mapping a meadow, (be fond of ‘example.com’) your users must make an A record in their DNS pointing at that IP address. They must use manifold A records if your server uses more than one IP address. If your user is mapping a hostname of a meadow (sometimes called a “subdomain”) be fond of http://www.example.com or blog.example.com it’s sufficient to make a CNAME record pointing at their blog url (NOT IP address).
The login page will very nearly always redirect back to the blog’s original meadow for login to ensure the user is logged in on the original arrangement as well as the meadow mapped one. For security reasons remote login is disabled if you allocate users to use their Dashboard on the mapped meadow.
Super admins can now choose to either allocate users to setup DNS ANAME records by supplying an IP (or catalog of IP addresses) or set a CNAME but not in cooperation (entering a CNAME for the end user voids the use of IP’s)
Here is a lot of argument on the treatment of DNS by CNAME and ANAME so in cooperation methods are available depending on your preference and setup.
Things to remember:
- CNAME records that point to other CNAME records must be avoided (RFC 1034 section 5.2.2) so single tell your end users to use your chosen meadow name as their CNAME DNS entry if your meadow name is an ANAME to an IP address (or addresses)
- Single use the CNAME method if your main meadow is an ANAME of an IP address. This is very valuable. How do you know? Check your dns or question your hosting company.
- Giving your users the option to solely use your chosen meadow name and not an IP (or catalog of IP’s) to set as their CNAME will get on to administration of your WordPressMU blog platform or WordPress 3.0 arrangement simpler, an example of this would be purchasing/deploying a new server or indeed count more servers to use in a round robin scenario. Your end users have no need to worry about IP address changes.
- Finally, telltale your end users to use an ANAME IP or CNAME meadow name is up to you and how your systems are deployed.
- Further Conception: http://www.faqs.org/rfcs/rfc2219.html
- For localization: place translation files (ie. wordpress-mu-meadow-mapping-xx_XX.mo) in the index wp-content/plugins/wordpress-mu-meadow-mapping/languages. You will probably have to make that index yourself.
- Install the plugin in the usual way into the regular WordPress plugins folder. Arrangement activate the plugin.
- Step sunrise.php into wp-content/. If here is a sunrise.php here already, you’ll solely have to merge them as most brilliant you can.
- Check over wp-config.php and uncomment or add the SUNRISE definition line. If it does not continue living please ensure it’s on the line higher than the last “require_once” mandate.
mark out( 'SUNRISE', 'on' );
- As a “super admin”, stay Super Admin->Meadow Mapping to make the meadow mapping catalog desk and set the server IP address or a meadow to point CNAME records at.
- Get on to sure the default Apache virtual host points at your WordPress MU site or WordPress 3.0 arrangement so it will handle unknown domains correctly. On some hosts you may be required to get a dyed-in-the-wool IP address. A quick check: in a web broswer, type in the IP address of your install. If you are by CPanel, use the Park a Meadow menu to set the mapped meadow to your main installtion.
- Do not mark out COOKIE_DOMAIN in your wp-config.php as it conflicts with logins on your mapped domains.
Illustrated installation instructions can be establish here but you can ignore the instructions to place domain_mapping.php in mu-plugins. Thanks Otto.
On Super Admin->Meadow Mapping you can configure the subsequent settings:
- “Remote Login” can be disabled. Useful if you’re hosting really separate websites.
- “Stable redirect” uses a 301 redirect rather than 302 to send visitors to your meadow mapped site.
- “User meadow mapping page” allows you to disable Settings->Meadow Mapping that the user uses.
- “Redirect administration pages to arrangement’s original meadow (remote login disabled if this redirect is disabled)” – with this tartan, if a user visits their dashboard on a mapped meadow it will redirect to the dashboard on the non mapped meadow. If you don’t want this, remote login will be disabled for security reasons.
- “Disable fundamental meadow check. Sites will not redirect to one meadow name. May cause duplicate content issues.” – ignore the fundamental meadow setting on your sites. The same content will be available on manifold domains and may cause problems with Google in view of the fact that of duplicate content issues.
Super Admin->Domains allows you to check over the domains mapped to any sites on your arrangement.
For Cpanel users
If your meadow uses the nameservers on your hosting account you must follow these instructions. If the nameservers are elsewhere change the A record or CNAME as documented higher than. 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 question them to get on to this one change for you. Must be no problem:
- Go to “Check over DNS Zone” and select the meadow of your WPMU installation and click “Check over”.
- Below “Add New Entries Below This Line”, enter in the first box (Meadow) an asterisk: “*”.
- The second box, TTL, must be “14400″.
- The third box must be “IN”.
- Select A Record Type from the drop not effective “A”.
- And in the last box, paste in the IP address of your website/arrangement.
From Cpanel, click on the “Parked Domains” under the “Domains” section:
- Under “Make a New Parked Meadow” enter the meadow name you want to add to your arrangement.
- Click the “Add Meadow” button.
- It must add the meadow to the catalog of parked domains and under “Redirect to” it will say “not redirected”. That is OKAY.
Now you’re ready to do your meadow mapping.