Google XML Sitemaps plugin for WordPress is probably one of the popular plugins in WordPress plugins repository. At the time of this writing, it has been downloaded over 8 million times! It is not a small feat by any means. However, if it is used incorrectly, it can drag your site’s performance considerably. Some web hosts even alert the site owner, if this plugin is used in their sites and politely ask the site owner to remove it at the earliest. So, what’s wrong with this plugin and how can you make use of it without affecting your site’s performance (and your host’s CPU). Let’s dive in!
Building Mode
By default, this (“Rebuild sitemap if you change the content of your blog”) option is enabled. It is of course a recommended practice. However, assume you have a blog with hundreds of posts (or pages). Each time, you click “Publish” button (or “Update” button), this plugin would create a new sitemap. As your site grows, the time to create a new sitemap will only increase as the years pass by.
Let me also quote what the author says about Building Mode with “Rebuild sitemap if you change the content of your blog” option is checked.
Your sitemap gets automatically refreshed when you publish or delete a post. If you have really much post, the process may take some time and you have to wait on the posting screen until it’s finished.
Any blogger who gets obsessed with blogging is going to create a lot of posts and is going to edit them whenever need.
Solution
Uncheck “Rebuild sitemap if you change the content of your blog” and then “Enable manual sitemap building via GET Request”. Once you checked the second option, you’d be presented with a URL to visit whenever you’d want to update the sitemap of your site. Finally, go to the bottom of this page and click “Update Options”
Post Priority
The above screenshot is what you see by default. So, by default, the sitemap is generated depending on the number of comments of the post to calculate the priority. When your site has thousands of comments, this can become tricky and will drag the performance of your site.
Solution
Choose the first option…. All posts will have the same priority which is defined in “Priorities”. Now go to the bottom of the page and you’d see another header “Priorities” where you can setup the priorities manually. Please don’t forget to click the button “Update Options”. :)
See you around with another article on performance optimization. Got any questions? Drop me a line in the comments.
interesting points – do you know what is the number of post when rebuilding XML sitemap starts taking ages? I bet it is thousands…
best regards!
Not sure, what you meant. If you have any trouble handling large number of posts, please try the solution mentioned here. I hope that helps.