Google (XML) Sitemaps Mirror WordPress Plugin

This plugin is a solution for those running both the Domain Mirror and the Google (XML) Sitemaps Generator plugins together in WordPress. Specifically it extends Google (XML) Sitemaps so that it creates one sitemap for each mirror set up in Domain Mirror. Sitemaps are created with the mirror URL prepended to the custom filename, so if your two mirrors are http://www.keendevelopment.ch and http://www.actionscriptfreelancer.com you’ll end up with two site maps called www.keendevelopment.chsitemap.xml and www.actionscriptfreelancer.comsitemap.xml. Submit these to Google in the webmaster panel for the appropriate mirrors and you’re good to go!

Download:

Download Google (XML) Sitemaps Mirror Plugin

Installation:

Download the zip from the link above and extract into your wp-content/plugins directory. Once you’ve done this go into your WordPress administration (on any mirror), click on Plugins and then click on Activate in the Google XML Sitemaps Mirror column. There are no settings or options for this plugin, once it is activated it will automatically start working. You’ll need to click on ‘Rebuild the sitemap manually’ after installation to generate the site maps for the first time, after which everything should happen automatically.

Requirements:

This plugin has been tested with:

  • Google (XML) Sitemaps Generator for WordPress 3.0.3.3
  • Domain Mirror 1.1
  • WordPress 2.5.1

… but that’s not to say it won’t work with other version 🙂 If you try it out and find that it works ok please comment and let me know and I’ll add the versions to the supported list. This plugin assumes that you have installed and activated both Google (XML) Sitemaps Generator and Domain Mirror. If you activate this plugin without one or both of these unexpected things may happen!

Features:

Nope 🙂 I created this plugin because I needed it so there are no bells and even fewer whistles. It does just what it says on the tin. However, all the normal features of Google (XML) Sitemaps Generator should work correctly on every mirrored sitemap, including auto-submission of each sitemap to search engines, auto re-generation on posting, etc.

Support:

I’ll probably not be making any updates to the plugin unless I actually require them myself, so its a ‘use at your own risk’ kind of thing. If anyone makes any changes to the code that they think may be useful to others please give me a shout and I’ll post improved versions up on this page.

WordPress, multiple domains & google analytics

So why not start here with a few things I discovered whilst getting this site going. This is my first time doing anything properly with WordPress and it gets the big thumbs up from me, speedy deployment, fairly easy to fiddle with and loads of plugins to play with.

Anyway, I managed to get hold of both www.actionscriptfreelancer.com and www.keendevelopment.ch which I’m hoping will push up my ratings in search engines for these keywords, so the first problem was getting two domains to point to a single WordPress installation. This turned out to be easily accomplished using the Domain Mirror plugin and changing the tagline slightly in each site should prevent Google penalizing them as duplicates (I hope). Then it was time for some Google Analytics provided courtesy of the Ultimate Google Analytics plugin.

However I hit a slight problem here as UGA only allows a single GA account id to be entered, but GA provides two seperate ids for the .com and .co.uk address. Time for a bit of PHP coding; I updated the Domain Mirror plugin so that you can also enter a GA account id for each domain, and then updated the Ultimate Google Analytics plugin so that it uses the account id for the current domain. Note that in order to get these two to work you’ll need to add a column to the wp_options table called googleid.

Download the two plugins as a zip here!