Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Better WordPress Google XML Sitemaps (support Sitemap Index, Multi-site and Google News)

A WordPress XML Sitemap plugin that comes with support for Sitemap Index, Multi-site and Google News sitemap. Image sitemap is supported, too.

1.4.1 (2016-01-15)

  • Bugs fixed
    • Use PHP 5.2 compatible function to get timestamp from a DateTime object. Thanks to K.J Ye for reporting!
    • Fix an issue with upgrade scripts being run too early.

1.4.0 (2016-01-14)

For a quick overview of all the changes, take a look at this article instead: http://betterwp.net/bwp-google-xml-sitemaps-1-4-0-released/

  • New Features
    • Add a "News age" setting to allow more control over the Google News sitemap's contents. See http://betterwp.net/wordpress-plugins/google-xml-sitemaps/faq/#google-news-age for more info.
    • Allow excluding posts by terms. If a post belongs to several terms, it will be excluded if any of those terms is excluded.
    • Add a new filter hook bwp_gxs_external_sitemaps that can be used to add non-BWP sitemaps to the sitemap index. Read here for more info.
    • Add featured image to existing post-based sitemaps.
      • To enable this feature, go to BWP Sitemaps > Extensions and choose to enable the "Google Image Sitemap" extension, and select post type(s) to enable the extension for.
      • This feature is enabled automatically for the Google News sitemap if the news post type has the "Google Image Sitemap" extension enabled for it.
      • As a related change for this new feature, Google News sitemap is now part of BWP Sitemap > Extensions as well.
    • Add ability to use custom post types and taxonomies for the Google News sitemap.
    • Allow regenerating individual sitemap via admin page.
    • Allow adding non-WordPress pages via BWP Sitemaps > XML Sitemaps > External Pages.
    • Allow excluding posts/terms via BWP Sitemaps > XML Sitemaps > Exclude items.
  • Enhancements
    • Disable some inputs when they are overridden via codes and display overridden values instead.
    • Make "Frequency", "Priority" and "Last modified" optional when adding/updating external pages.
    • Handle last modified datetime of non-post items more consistently.
  • Other Changes
    • Update language template file. If you're a translator, please help translating this plugin! For more info, see: http://betterwp.net/wordpress-tips/create-pot-file-using-poedit/
    • Mark as compatible with WordPress 4.4+. Now require at least WordPress 3.6 and PHP 5.2.0.
    • Choosing which post types/taxonomies to generate sitemaps for is now an opt-out setting. Instead of choosing which post types/taxonomies to disable sitemap generation, you would now choose post types/taxonomies whose sitemaps should be generated.
    • Display an error message when enabling the Google News sitemap but it can not be generated.
    • Make it more obvious to check and generate the Sitemap Index when needed.
      • If no sitemap has been generated yet, a button to generate the Sitemap Index will be shown.
      • The "Clear All Logs" button have been moved to the "Sitemap Log" tab, and renamed to "Clear Message Log". Clicking on that button will now clear the message log only, leaving the sitemap log untouched. The sitemap log is expected to be improved in version 2.0.0.
    • Disable indexing of sitemaps using the X-Robots-Tag: noindex header.
    • Add more Google News sitemap languages, allow customizing language list via bwp_gxs_news_languages filter hook.
    • XSLT stylesheet is now disabled by default.
  • Bugs fixed
    • Fix a bug that causes post.xml to be included in sitemap index even when explicitly excluded.
    • Fix a bug that causes the sitemap index to be empty when post-splitting is not enabled.
    • Filter out urls whose protocols do not match the current protocol.
      • When SSL is not used, all HTTPS urls will be filtered out.
      • When SSL is used, all HTTP urls will be filtered out.
    • Fix a bug that makes it not possible to flush the default cache directory. The cause was we cached the cache directory in the BWP_Sitemaps::$cache_directory object, which was not updated correctly when flushing cache.
    • Fix a bug that could lead to custom post types being included in post.xml sitemap.
    • Fix a bug in the Google News sitemap that leads to duplicate posts when posts are assigned to multiple categories.
    • Fix a bug that generate duplicate terms when some terms are excluded.
    • Use UTC timezone when looking for google news posts.


* Marked as WordPress 4.0 compatible.
* Added `bwp_gxs_excluded_posts` filter hook to page sitemap module. It should be possible to use an array of page ids to exclude certain pages from the page sitemap.
* Added a `News name` setting (in *XML Sitemaps >> Google News Sitemap*).
* Other minor fixes and enhancements.


  • New features

    • Added a new setting to control which post types can be used to ping search engines
    • Added a ping limit setting
    • Added a "Save changes and Flush cache" button
  • Enhancements

    • Plugin's admin areas have been re-organized to be easier to use.
    • Updated all sitemap modules with easier to use APIs.
    • Last modified dates are now more properly handled.
    • Error log has been refined to be more friendly and useful.
    • Post types that do not have any post should not be listed in sitemapindex.xml by default.
    • Posts that are password-protected should not be listed in sitemap files.
    • Be more selective when pinging search engines, this is to avoid double pinging when using plugin like Snitch.
    • Replaced the "Clean PHP errors" function with a "Debug extra" mode that can be used to easily debug "Content Encoding error" and similar errors, more info about "Debug extra" here.
    • When debug or debug extra is on, no-cache headers are sent to ensure a proper debugging environment.
    • Caching is now disabled by default to avoid confusion when setting up the sitemapindex.
    • Cache directory can now be edited via:
      • Plugin's admin area: BWP Sitemaps >> XML Sitemaps >> Caching
      • PHP Constant: e.g. define('BWP_GXS_CACHE_DIR', 'path/to/cache/directory');
      • Filters: use bwp_gxs_cache_dir
    • Added bwp_gxs_excluded_posts filter hook to let users exclude posts using an array of IDs instead of an SQL string. This is meant to replace bwp_gxs_post_where filter hook when using to exclude certain posts. More info here.
    • Added bwp_gxs_excluded_terms filter hook as a taxonomy-equivalent to bwp_gxs_excluded_posts, this works the same as (and deprecates) bwp_gxs_term_exclude.
    • Added bwp_gxs_sitemap_lastmod filter hook to let users modify last modified dates of sitemaps inside a sitemapindex programmatically when needed.
    • Ping settings can now be set per blog instead of site-wise.
    • Added a Spanish translation - Thanks to Ruben!
    • Added more News languages:
      • Hebrew (he)
      • Traditional Chinese (zh-tw)
      • Arabic (ar)
      • Hindi (hi)
      • Japanese (ja)
    • Other enhancements.
  • Bugfixes:

    • Fixed an issue that might cause an extraneous split part to appear.
    • Fixed an issue that might cause "Invalid last modified date" error
    • Fixed an issue that might cause the sitemapindex to use the regular XSLT stylesheet
    • Sitemapindex should now respect excluded posts when splitting post-based sitemaps
    • Other bugfixes.

Important Update Note:

  • if you're using custom modules make sure that you re-read the documentation for updated info about the module API.
  • When the sitemapindex is generated for the first time, you won't see any Last modified date for any child sitemaps because none of them have been generated yet. This is expected and adhered to the official sitemap protocol.

Requires: 3.6 or higher
Compatible up to: 4.4.7
Last Updated: 1 year ago
Active Installs: 100,000+


4.3 out of 5 stars


0 of 5 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

67,3,2 100,1,1 100,2,2 100,1,1 100,1,1 100,2,2
67,6,4 0,1,0
75,4,3 71,7,5 100,2,2
100,2,2 100,1,1
100,1,1 100,1,1 100,2,2 100,2,2 100,5,5 50,2,1 88,8,7
80,5,4 100,3,3 100,2,2
100,2,2 100,1,1
100,1,1 33,3,1 100,3,3