Title: XML Parsing Error &#8211; syntax error
Last modified: August 21, 2016

---

# XML Parsing Error – syntax error

 *  [Media Design](https://wordpress.org/support/users/tonyweb/)
 * (@tonyweb)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/)
 * Hi!
 * My WP version is 3.5.2 and I use the last version of WordPress SEO by Yoast.
 * I have problem with /page-sitemap.xml
 * and error message is:
 * XML Parsing Error: syntax error
    Location: [http://www.mediadesign.bg/page-sitemap.xml](http://www.mediadesign.bg/page-sitemap.xml)
   Line Number 1, Column 1: **2c35** ^
 * for this site.
 * On the other sites, errors are the same but only numbers are different , instead
   of all sitemaps – page, post, category and etc.
 * For example:
    Line Number 1, Column 1: **15e1b** ^
 * How to fix this problem?

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/2/?output_format=md)

 *  [Reinhard Stompe](https://wordpress.org/support/users/crashguru/)
 * (@crashguru)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954441)
 * Hi,
    I have a similar problem. After clicking on the Sitemap button in the sitemap-
   admin-page to view the sitemap I am getting:
 * “error on line 3 at column 6: XML declaration allowed only at the start of the
   document”
 * in Chrome and Firefox.
 *  [Fornelli](https://wordpress.org/support/users/fornelli/)
 * (@fornelli)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954474)
 * I’m having this same issue, is this still something to do with some white spacing
   in the themes functions.php file?
 *  [webcheck](https://wordpress.org/support/users/webcheck/)
 * (@webcheck)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954514)
 * Found a possible workaround: Limit the number of entries displayed per sitemap-
   page. You can adjust this via Yoast -> SEO -> XML-Sitemap and enter a number 
   in the field at the bottom. 25 worked for me.
 * A recap of my problem: Ran into the same as Tony. Only page-sitemap.xml echoed
   this strange error (or more explicit: a leading number, so that the xml would
   fail to parse).
    Due to this limited error, I suspected the page-content to be
   faulty. After some checks I was able to rule this out. So I exported the whole
   content and uploaded it to another of my test system (with another hoster): Et
   voila, everything was perfectly fine. So my conclusion: I guess the max_execution_time
   lead to this error. On my live system (where the error occured) the max_exec.
   is 30. On my test server 60.
 * So limiting the displayed items solved the problem for me. Please try this yourself
   and give some feedback to my workaround.
 *  [patter38](https://wordpress.org/support/users/patter38/)
 * (@patter38)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954515)
 * I tried the suggestion (set to 25 as well) and that did not work… I have thee
   network version of WP installed.
 * BTW… last time I checked it (oh, say a month or so ago), it worked fine.
 * I get this message on my sites….
 * 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.
 *  [webcheck](https://wordpress.org/support/users/webcheck/)
 * (@webcheck)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954516)
 * Perhaps an even lower value is needed for your hoster? Just for fun try setting
   it to 5. If its working, try bumping this up step by step. If its still broken
   I withdraw my workaround.
 *  [patter38](https://wordpress.org/support/users/patter38/)
 * (@patter38)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954517)
 * I really appreciate the quick response. Unfortunately, changing this to 5 did
   not matter.
 * I will upgrade WordPress to 3.6 this weekend, just to be sure, but as I said..
   It worked fine a month ago… and I am only at the previous release, not way back.
 *  [Fornelli](https://wordpress.org/support/users/fornelli/)
 * (@fornelli)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954518)
 * I don’t believe it’s a WP version issue due to the fact that I have several other
   blogs and the XML sitemap works fine. I ended disabling the sitemap feature and
   installed BWP Google XML Sitemaps a light XML sitemap plugin and all good now.
   I couldn’t figure out why it was giving that line error and I no time to figure
   troubleshoot… I had to start dumping my sitemaps to Google webmaster tools. Might
   be a quick solution for some of you who need your site indexed ASAP.
 *  [Reinhard Stompe](https://wordpress.org/support/users/crashguru/)
 * (@crashguru)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954519)
 * I just installed the Google Sitemap generator from Arne Bachthold. Same error
   message(!), then I installed BWP Google XML Sitemaps and Google sitemap plugin,
   both work fine, but produce not all entries.
    Then I tested everything locally
   on Xampp. No errors, but my local WP version is 3.5 and has only 1,600 entries.
   That leaves the WP version or the execution time, which is 300 ms on my Xampp.
 *  [webcheck](https://wordpress.org/support/users/webcheck/)
 * (@webcheck)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954520)
 * When the error occured on my website, WordPress 3.5 was up and running. So I’m
   still tending to point at the execution time.
 * Perhaps Yoast is capturing the entries for the sitemap in a different, far more
   execution time expensive way than the other plugins?
 * [@crashguru](https://wordpress.org/support/users/crashguru/): Did you try my 
   suggestion reducing the number of entries in Yoast? I’m still pretty convinced
   of this as a possible solution.
 *  [Reinhard Stompe](https://wordpress.org/support/users/crashguru/)
 * (@crashguru)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954521)
 * [@webcheck](https://wordpress.org/support/users/webcheck/): No, I didnt reduce
   the number of entries. My sitemap should have about 72,000 entries, if it works
   properly. With Yoast’s sitemap it shouldnt be more than 50! I find it interesting
   though, that all these sitemap plugins produce the same error message. May be
   the message is correct? I have to find a different solution to my problem.
 *  [patter38](https://wordpress.org/support/users/patter38/)
 * (@patter38)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954522)
 * This is getting pretty frustrating… I tried a couple other sitemap generators
   and this is still the message…
 * Could there be some conflicting plugin? Is WordPress causing an issue? Ugh!
 *  Thread Starter [Media Design](https://wordpress.org/support/users/tonyweb/)
 * (@tonyweb)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954523)
 * Hi there! I also tried to change number of limit to 25, but no take any effects.
   Then changed to 20 and then to 15,10,5 aslo 50 … but not working for me.
 * After that I increased max_execution_time from 30 to 60 sec. and this no get 
   positive result.
 * May be I will wait for compatible version of Yoast plugin with WP 3.6
 *  [Reinhard Stompe](https://wordpress.org/support/users/crashguru/)
 * (@crashguru)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954524)
 * There might be two issues here involved:
    The sitemap must not have more than
   50.000 entries and max. file size 10MB. [@patter38](https://wordpress.org/support/users/patter38/):
   Did you upgrade to WP 3.6?
 *  [patter38](https://wordpress.org/support/users/patter38/)
 * (@patter38)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954525)
 * I do not believe it is a size issue… I played with a couple other SiteMap programs(
   needing to completely disable the Yoast plugin, (not just it’s sitemap generator).
 * Interesting, the other programs had the same problem… one difference, though,
   was that I was able to view the source on the other ones… and I noticed the first
   line was blank. The error says “XML declaration allowed only at the start of 
   the document”.
 * I wonder if WordPress or a stray plugin is putting in the blank line… I have 
   disable many plugins (not all… I just can’t)… and have not fund the problem child…
 * WordPress.org… help! As a multi-user site I have several clients now with Sitemap
   issues…
 *  [Reinhard Stompe](https://wordpress.org/support/users/crashguru/)
 * (@crashguru)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/#post-3954526)
 * Well, the 50,000 # is a RULE from Google. Did you upgrade to WP 3.6?

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/2/?output_format=md)

The topic ‘XML Parsing Error – syntax error’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [sitemap error](https://wordpress.org/support/topic-tag/sitemap-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)
 * [XML parsing error](https://wordpress.org/support/topic-tag/xml-parsing-error/)

 * 31 replies
 * 10 participants
 * Last reply from: [zbour31](https://wordpress.org/support/users/zbour31/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/xml-parsing-error-syntax-error/page/3/#post-3954604)
 * Status: not resolved