Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

msm-sitemap

Comprehensive sitemaps for your WordPress.com VIP site. Joint collaboration between Metro.co.uk, WordPress.com VIP, Alley Interactive, Maker Media, 10up, and others.

Subscribe to updates I use msm-sitemap


Statistics on msm-sitemap

Number of watchers on Github 35
Number of open issues 25
Average time to close an issue 3 months
Main language PHP
Average time to merge a PR 3 days
Open pull requests 13+
Closed pull requests 6+
Last commit almost 2 years ago
Repo Created over 6 years ago
Repo Last Updated almost 2 years ago
Size 343 KB
Organization / Authorautomattic
Latest Release1.3
Contributors9
Page Updated
Do you use msm-sitemap? Leave a review!
View open issues (25)
View msm-sitemap activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating msm-sitemap for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Comprehensive Sitemaps

Comprehensive sitemaps for your WordPress.com VIP site. Joint collaboration between Metro.co.uk, WordPress.com VIP, Alley Interactive, Maker Media, 10up, and others.

How It Works

Sitemap Data Storage

  • One post type entry for each date.
  • Sitemap XML is generated and stored in meta. This has several benefits:
    • Avoid memory and timeout problems when rendering heavy sitemap pages with lots of posts.
    • Older archives that are unlikely to change can be served up faster since we're not building them on-demand.
  • Archive pages are rendered on-demand.

Sitemap Generation

We want to generate the entire sitemap catalogue async to avoid running into timeout and memory issues.

Here's how the defualt WP-Cron approach works:

  • Get year range for content.
  • Store these years in options table.
  • Kick off a cron event for the first year.
  • Calculate the months to process for that year and store in an option.
  • Kick off a cron event for the first month in the year we're processing.
  • Calculate the days to process for that year and store in an option.
  • Kick off a cron event for the first day in the month we're processing.
  • Generate the sitemap for that day.
  • Find the next day to process and repeat until we run out of days.
  • Move on to the next month and repeat.
  • Move on to next year when we run out of months.

CLI Commands

The plugin ships with a bunch of wp-cli commands to simplify sitemap creation:

$ wp msm-sitemap
usage: wp msm-sitemap generate-sitemap
   or: wp msm-sitemap generate-sitemap-for-year
   or: wp msm-sitemap generate-sitemap-for-year-month
   or: wp msm-sitemap generate-sitemap-for-year-month-day
   or: wp msm-sitemap recount-indexed-posts

See 'wp help msm-sitemap <command>' for more information on a specific command.
msm-sitemap open issues Ask a question     (View All Issues)
  • over 3 years Kill The Cron
  • almost 4 years Send 404 code instead of 500 for non-existant sitemap
  • about 4 years Rethink how "msm_sitemap_update_last_run" works
  • almost 5 years Missing README and documentation
  • about 5 years Duplicate code for generating sitemaps from CLI and cron
  • about 5 years Add method to delete a sitemap by date
  • over 5 years lastmod for index
  • over 5 years Incorrect Lastmod date
  • almost 6 years Add Images to sitemaps
  • almost 6 years Large Sitemap List Issue
  • about 6 years Support for non-date-based post types
  • about 6 years kses for sitemap content
  • about 6 years Full i18n sweep
  • about 6 years Use rewrites instead of querystrings
  • about 6 years Sitemap Pings
  • over 6 years News Sitemap
msm-sitemap open pull requests (View All Pulls)
  • Add kill switch for cron.
  • Allow years to be queried to allow webmastertools
  • Use URL rewriting instead of query arguments
  • Issue 110
  • add image sitemap in schemaLocation
  • Don't autoload indexed url and last run options
  • Image Sitemap support
  • Kill full sitemap cron generation
  • Substitute cal_days_in_month
  • Remove extra wp query
  • Remove flot submodule
  • If all posts were skipped, remove the sitemap post.
  • Remove deprecated `screen_icon()` call
msm-sitemap list of languages used
Other projects in PHP