We’re excited to announce the availability of a new plugin for WordPress.com VIPs: Comprehensive Sitemaps.
All WordPress.com sites come with XML sitemaps built-in. These files are automatically generated, cached for a 24-hour period, and updated whenever a post is published, updated, or deleted—however, they are also limited to the 1,000 most recent posts.
With Comprehensive Sitemaps, you can now build and serve sitemaps encompassing all of your content, to help give search engines an extra boost when crawling your site. This is done by using sitemap indexes and breaking down the files into years, months, and days. Additional care was taken to optimize the plugin for quick and fast delivery (individual sitemap files are pre-generated), and the plugin smartly handles post changes by updating only the affected sitemap files, so you’re always serving up-to-date content.
The code was originally written by the development team at Metro UK. Here’s what Paul Kevan, a Metro engineer, had to say about the plugin:
The sitemap plugin spawned out of a requirement to maintain our indexing when migrating over from our in-house CMS to WordPress.com. The default plugins only output 1000 posts and considering the Metro site had over 300k posts, we were worried about the indexing drop when we not only moved hosting but also changed the structure of our permalinks.
Three months later, thanks in part to the plugin, we had fully reindexed the whole site in Google with only a few minor problems.
When the VIP team got in touch to discuss open sourcing the plugin, we were only too pleased to say “yes”. The Metro development team is able to be very lean thanks to the services of WP.com VIP and we were conscious that the best way to repay this was contribute back to the community.
We worked closely with Paul and Metro’s development team to get the plugin into a shareable state. Other VIPs like Maker Media and Service Partners like Alley Interactive and 10up also offered to help and contributed code that helped further clean up or optimize the code or introduce new features.
Installing the Plugin
The plugin needs to be installed via your theme code:
wpcom_vip_load_plugin( 'msm-sitemap' );
Setting up Sitemaps
Once you’ve committed the code change to activate the plugin, please open a ticket so that we can generate the sitemap for you. We need to run a one-time process to generate the full archive; it’s rather resource-intensive and something that we can help run in a smooth manner.
Note: if you’re using custom post types and want to include them in the sitemap, you need to explicitly include them via the
You can follow development on Github. If you come across problems, we ask that you first check the issues on Github and if the problem hasn’t already been reported, go ahead and create a new one. There are several fixes and improvements planned; pull requests are welcome and highly encouraged.
A big thank you to Metro UK for contributing this code back to the VIP community!
Map of Boston courtesy of the Norman B. Leventhal Map Center at the BPL.