Geek alert: this will be highly technical, convoluted, and no doubt indecipherable to many. A WordPress plugins conflict on this blog made it seemingly impossible to create a sitemap, no matter what I did. The problem appeared to be a problem deep with the innards of W3 Total Cache. If I deactivated W3TC, sitemaps were created. But I couldn’t stop using W3TC because it also publishes to my Amazon CDN.
A disk cache like W3TC speeds up a website by offering static HTML pages to visitors rather than re-creating the page each time with dozens of database operations, etc. The home page of this blog is written in PHP and accesses the database. W3TC makes a HTML copy of the home page and gives that to readers. It knows when a post is added or updated and automatically updates the cache.
W3TC also publishes all the images and much of the code on the blog to a content distribution network on Amazon, who puts it on servers across the planet. So, if someone in Japan looking at polizeros, they will be viewing a header image stored on Amazon servers in Asia rather than in Texas, where the blog is hosted at Rackspace. This allows much faster access to the blog and cuts way down on server usage. My bill last month from Amazon was about $2. This clearly shows the power and advantages of cloud computing. You only pay for what you use, with no monthly minimum charges.
A sitemap is a special text file that lists all the pages and posts on the blog. Search engines use them to quickly find and index what is on the website. But whenever I tried to create a sitemap with W3TC activated, a page not found error would occur when trying to view it. After trying several sitemap plugins, I settled on the BWP Google XML Sitemap plugin, got the error again, and emailed the developer.
Folks, when you email a developer, be nice! A grumpy inquiry may get ignored. My inquiry was friendly and he had the answer. Go to the 404 error section of the W3TC Browser Cache tab and change sitemap\.xml(\.gz)? to (sitemapindex|[a-z0-9_-]+)\.xml. I did so and the sitemap then created itself instantly. See, wasn’t that simple.
This took me about a month to figure out! And I of course sent a quick Thank You to the developer.