866-764-TECH(8324) · Subscribe to Application Solution Providers, Inc.News FeedSubscribe to Application Solution Providers, Inc.Comments

WordPress 3.0′s Multisite feature is cool and useful. The Google (XML) Sitemaps Generator plugin is also cool and useful. Unfortunately Arne Brachhold’s excellent plugin does not work with multisite blogs.

If you activate the plugin on a multisite enabled WordPress install, you get this error message.

Which is a shame, but it did not take me a long time to find a work around. My setup is using multisite with sub-domains and with the Domain Mapping plugin. These instructions are for the 3.2.4 version of the plugin.

1. Modify the plugin

Edit the file wp-content/plugins/google-sitemap-generator/sitemap.php and comment out lines 53 to 58 to look like this

1 //Check for 3.0 multisite, NOT supported yet!
2 // if((defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE) || (function_exists('is_multisite') && is_multisite())) {
3 //      if(function_exists('is_super_admin') && is_super_admin()) {
4 //              add_action('admin_notices',  array('GoogleSitemapGeneratorLoader', 'AddMultisiteWarning'));
5 //      }
6 //
7 //      return;
8 // }

You can delete these lines, but I prefer to comment them out.  All this does is prevent the plugin from detecting the multisite setup and not becoming active.

2. Get your rewrite rules ready

In your blog’s .htaccess file add these lines above your WordPress rules

1 RewriteRule ^sitemap.xml sitemap-%{SERVER_NAME}.xml [L]
2 RewriteRule ^sitemap.xml.gz sitemap-%{SERVER_NAME}.xml.gz [L]

This will come in handy later.

3. Activate the plugin and set these options

Now on each of your sites in your WordPress network, activate the Google (XML) Sitemap plugin. Do not Network Activate it.

Now got to your XML-Sitemap options page and for “Location of your sitemap file” select Custom location.

In the custom location change your change the file name sitemap.xml to sitemap-yourblogservername.xml. My server name is blog.dembowski.net so I’m using sitemap-blog.dembowski.net.xml. Save the options.

Look in your WordPress installation’s root and check if you have sitemap.xml or sitemap.xml.gz. If you do then delete them both.

Now at the top of that options page, click on “rebuild the sitemap manually” and confirm that your new sitemap-yourblogservername.xml has been created.

4. Test and confirm that this worked

Now test two things. Start by pointing your browser to http://yourblogservername/sitemap.xml and then http://yourblogservername/sitemap-yourblogservername.xml. If you setup your .htaccess rewrite rules correctly, then both URLs should work.

Load up your WordPress generated robots.txt file via http://yourblogservername/robots.txt and look at the Sitemap line. Mine reads like this

I have that rewrite rule in case the default location for the sitemap is used.  When you load the sitemap via the normal location, the rewite rule sends it to the correct location. The second gziped sitemap URL is fine.

There should be no real sitemap.xml or sitemap.xml.gz files in your blog’s root directory. Instead, each sitemap file should have your virtual WordPress network names instead.

5. Rinse and repeat

Repeat this process for each site in your WordPress Network and you can continue to use this sitemap plugin. You will need to activate the plugin in each of your sites and change sitemap.xml to include the site name just as I outline in step 3.

6. The caveat

If this works for you, great! But if it doesn’t, please don’t bug Arne. If and when he makes his plugin multisite compatible, then it will be probably a better solution than this one. I’m not seeing any PHP errors or warning in my log files, but there may be reasons why this is not a good idea.

Also, when you modify your copy of a plugin in the WordPress plugin repository and that plugin is updated you will lose your edits from step 1 when you update the plugin.

In the meanwhile, I can continue to use this excellent plugin.

Features developed within an iteration should be 100% complete. Too often in software development, “done” doesn’t really mean “DONE!”. It doesn’t mean tested. It doesn’t necessarily mean styled. And it certainly doesn’t usually mean accepted by the product owner. It simply means developed. Read more

Software Development evolves but timelines and cost should be fixed. Distinguish between “I Need”, and “I Wish”. This is in stark contrast to traditional software development projects, where one of the earliest goals is to capture all known requirements and baseline the scope of work so that any other changes are subject to change control. Read more

A powerful development team must include all the necessary members to make decisions, and make them on a timely basis. Every business has encountered the IT staff claiming “it’s not the hardware, it’s the software.” while the development team says, “it’s not the software it’s the hardware.” Meanwhile the owner and users say, “I don’t care, just make it work.” Read more

Software development is about frequent delivery of products and services. Gone are the days of the 12 month development project. If your software vendor isn’t releasing new features at least 4 times a year your falling behind. 3 to 6 month project delivery is not just strategic it’s necessary! Read more

In traditional software development projects, the life-cycle is Analyze, Develop, Test – first gathering all known requirements for the whole product, then developing all elements of the software, then testing that the entire product is fit for release. With successful software development, the cycle is Analyze, Develop, Test; Analyze, Develop, Test; and so on… doing each step for each feature, one feature at a time. Read more

The most difficult step in a development project is establishing the relationship between industry experts and the developers. Users should be directly involved in development projects. Particularly when the scope of development project includes product and services where the end users will be external customers or consumers. Read more

Apply just-in-time manufacturing principle to software development. A software development team should capture the requirements at a high level, as needed, just-in-time for each feature to be developed and deployed. In manufacturing you don’t want unnecessary parts cluttering your warehouse but also dont want to stop your assembly line because necessary components have not arrived. Read more

With software development, testing is integrated throughout the life-cycle. The software should be continuously throughout its development. Software development should not have a separate test phase. Developers should be more heavily engaged in testing and writing automated repeatable unit tests to validate their code. Read more

Pareto’s law is more commonly known as the 80/20 rule. The theory is about the law of distribution and how many things have a similar distribution curve. This means that typically 80% of your results may actually come from only 20% of your efforts! Read more