If you use the Google sitemap plugin for WordPress it’s probably a good idea to disable the auto rebuild option. This is especially true if you have a large blog and a small server!
Go to Options->Sitemap and uncheck “Rebuild sitemap if you change the content of your blog”.
You can regenerate the sitemap by calling a URL with a secret key. It’s listed on the configuration page. Copy it into your bookmarks or make a cron job to call that URL at a time when your server isn’t busy. Posting to this blog would timeout quite often if the server was loaded in any way. If it wasn’t loaded before, it almost always was after! It took some time for me to figure out that it was the Sitemap generator.
The sitemap generator plugin is a great program, it does what it says on the box, but disable to the auto-update feature if you’re having problems posting!
Good tip Donncha, I’ve got a blog suffering from just that problem, so I’ll be sure to give it a burn!
What are the steps to setup a cron job to do that?
Yeah, I found that out myself while running a big site (50,000+ posts) on a small VPS server. It does better now on dedicated, but I had to disable portions of the plugin.
Well, no problems posting for me, but thanks anyway – when I went to check this, I noticed sitemap.xml creation was failing altogether!
BTW, what version are you on? I don’t have that exact option…
Recursive link in the post: I’m guessing http://ocaoimh.ie/2006/09/11/google-sitemap-wp-plugin-tip/ should be http://www.arnebrachhold.de/2005/06/05/google-sitemaps-generator-v2-final?
Thanks Charles, there was a “-” instead of a “=” in the href attribute of the link! Corrected now!
does it apply to posting from a blog client as well?
Posting from a blog client would trigger the same events as using in the WordPress Write screen.
Next on the agenda is to look at the the JOINs in UTW. There’s one particular one linking the posts table and the post2tag table that is a dog on this blog because of the number of posts.
What sort of problems?
I think the main reason to disable auto-update would be to reduce load on the server?
TechZ – my main problem included timeouts because the sitemap took so long to complete, and yes, the load on the server. I thought those would be self evident so I didn’t mention them.
I still use it though as it does it’s job well!
Donncha: how to “make a cron job to call that URL” ? I setup cron job via Cpanel. What is the correct syntax? Thank you.
LcF – it looks like Cpanel has a nice gui for manipulating cron jobs. Here’s some docs I found on the subject: http://www.visn.co.uk/cpanel-docs/cron-jobs.html
You need to verify that “wget” is available on your machine and then set up a job that uses wget to fetch the “generate sitemap” url.
wget -q -O – “http://yourhost.com/?sm_command=build&sm_key=1234567890” > /dev/null
I wouldn’t call it more than once a day, or perhaps twice a day because of the load it generates.
@Mark Wegner – I use webcron.org to automate things like this. Just give it the unique URL to rebuild the sitemap and it’ll visit that page on the schedule you define,
Donncha, thanks, was just making sure. I have Plesk on my hosting,
Here’s a guide for others using Plesk too.
I will try webcron.org service. Thanks 🙂
Thanks for the advice and for the cPanel guide hints! I’ll do this, if I can figure out how to have the cron job added. I can also agree that it is a great plugin, well worth using! Google searches brings me half of all my visitors (which is around 3k/day) and I think that the sitemap plugin has an obvious part in that.
I have to ask Joe’s question as well – what version? I’m running 2.7.1, which appears to be the current, non-beta, version.
Is the beta pretty stable, then?
It looks like I’m running version 3.0b1, a beta version. It’s very stable, and probably worth upgrading if the disable auto-update option isn’t available in the current non-beta releases!
I am also running version 3.0b1, it seems to be pretty stable so far. No hiccups.