This is a "Quick Tips" post.
Ok, I understand. It is frustrating. Don't worry, hopefully this will help you solve the problem to date to get your WordPress XML sitemap errors fixed & back up.
Whether you are running on a WordPress multisite or single installation, having your XML sitemap disappear apparently "out of the blue" can happen. Sometimes this can happen after a WP core update, plugin update, theme update (or lack of updating too for that matter) . . . or a host of other reasons. This can apply to the Yoast WordPress SEO plugin or even other types of XML sitemaps as well. You may experience a 404 error, 503, page not found, XML errors of some kind, or other unpleasant messages that do not make you smile as the noon-day sun does.
By the way, a "Quick Tips" post seeks to give you information fast so that you can get something useful from them fast that is actionable (without have having to read a lot of stuff). It attempts not to post too much information so as to avoid "information overload" (thereby many times invoking inaction vs. action in a majority of people . . . yes, there are exceptions).
Ok, back to sitemaps . . .
NOTE: Yes, this can happen to your RSS feeds too (same fix can fix both issues).
Ok, here you go:
- First, check/follow this: http://kb.yoast.com/
- Second, then check/follow this: http://kb.yoast.com/
article/16-my-sitemap-is- giving-a-404-error-what- should-i-do
- Third, go here and follow it: http://piotrkrzyzek.com/wordpress-remove-blank-line-from-rss-feed-wordpress-error-on-line-2-at-column-6-xml-declaration-allowed-only-at-the-start-of-the-document/ (yep, it is a old post but the solution still works great . . . the comments on it continue to this day).
- Fourth, go to yousite.com/wp-admin/options-permalink.php and re-save your permalinks.
- Fifth, go to yoursite.com/wp-admin/admin.php?page=wpseo_xml to unchecked the box "Check this box to enable XML sitemap functionality" and save and re-save.
- Sixth, give it a few minutes to repopulate your sitemap automatically (sometimes it is not immediate). Also, feel free to reverse the fourth and fifth item too (or do it again if it did not reset the first time you tried it).
There you have it. I hope it helps some folks out there . . .
If you want, we would love to help you out with the WordPress XML sitemap problem if you need more help OR would like other dedicated & personal limitless WordPress help and support. View Pricing & Plans here.