Title: Sitemap error
Last modified: August 22, 2016

---

# Sitemap error

 *  Resolved [Thavm](https://wordpress.org/support/users/thavm/)
 * (@thavm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/)
 * I just startes with All in ONe SEO pack. Really like it!
 * But when I want view the sitemap I get this message:
 * This page contains the following errors:
 * error on line 2 at column 6: XML declaration allowed only at the start of the
   document
    Below is a rendering of the page up to the first error.
 * [https://wordpress.org/plugins/all-in-one-seo-pack/](https://wordpress.org/plugins/all-in-one-seo-pack/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364686)
 * What is the URL for your XML Sitemap?
 *  Thread Starter [Thavm](https://wordpress.org/support/users/thavm/)
 * (@thavm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364695)
 * [http://lumibyte.eu/sitemap.xml](http://lumibyte.eu/sitemap.xml)
 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364696)
 * Hi Thavm,
 * You have a blank line outside your PHP tags in one of your theme files. This 
   causes this error. You’ll need to find the theme file in question and remove 
   the blank line.
 *  Thread Starter [Thavm](https://wordpress.org/support/users/thavm/)
 * (@thavm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364779)
 * I deleted all blank lines in the theme files outside the php tags (about 40 different
   files all manually checked, including the functions.php file), nothing changed,…
   
   then I deleted all blank lines, also the ones between the php tags, nothing changed,….
 * there are also php files in the subfolders: inc, framework and css. Could there
   be the one causing problems? There are just so many files to check and the idea
   that when I mis one I have to start all over again is making me feel a little
   desperate.
 * Would using this ba a good idea? It claims to clean up the blank lines,…
 * [http://www.flyaga.info/fix-rss-feed-wordpress-plugin/](http://www.flyaga.info/fix-rss-feed-wordpress-plugin/)
 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364780)
 * Hi Thavm,
 * I don’t have any suggestions for an easy way to find and delete whitespace from
   PHP files. I’ve not tried that plugin before, if you try it then make sure you
   take a full backup of your site and theme before trying.
 * The problem is still there and it’s definitely caused by a blank line in one 
   of your theme’s PHP files.
 *  Thread Starter [Thavm](https://wordpress.org/support/users/thavm/)
 * (@thavm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364781)
 * I think it worked!!!! Thank you so much!
 * (now I just need to go through the site so see if I didn’t break anything)
 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364783)
 * Yep, your XML sitemap is now working. Any time you see that issue its because
   of whitespace in PHP files which will break any XML.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Sitemap error’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

## Tags

 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 7 replies
 * 2 participants
 * Last reply from: [Steve M](https://wordpress.org/support/users/wpsmort/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/sitemap-error-22/#post-5364783)
 * Status: resolved