WordPress.org

Forums

Google XML Sitemaps
error on line 3 at column 6: XML declaration allowed only at the start of the do (14 posts)

  1. gnosis_wp
    Member
    Posted 9 months ago #

    Unable to render the sitemap.xml, I get the following error:

    error on line 3 at column 6: XML declaration allowed only at the start of the document

    https://wordpress.org/plugins/google-sitemap-generator/

  2. selenii
    Member
    Posted 9 months ago #

    I have the same problem but

    error on line 1 at column 6: XML declaration allowed only at the start of the document

  3. gnosis_wp
    Member
    Posted 9 months ago #

    I removed all the white space from my theme functions file and it seemed to have resolved the issue.

  4. selenii
    Member
    Posted 9 months ago #

    wich all white space ?

  5. gnosis_wp
    Member
    Posted 9 months ago #

  6. selenii
    Member
    Posted 9 months ago #

    but in wich file should I make this?

    in functions.php is all okay

  7. gnosis_wp
    Member
    Posted 9 months ago #

    Did you remove white space after the last php bracket?

    Do you use a child theme? If so, did you look at custom functions file?

  8. selenii
    Member
    Posted 9 months ago #

    I use my own theme. And yes I remove white space after the last php bracket, in functions.php

  9. gnosis_wp
    Member
    Posted 9 months ago #

    Did you look at the other solutions? Also, what do you have your file permissions set as?

  10. selenii
    Member
    Posted 9 months ago #

    wich solutions are you minds?

    and wich file shoud I permission look of?

  11. gnosis_wp
    Member
    Posted 9 months ago #

    look at links above. With the exception of a few files, I set almost all the files to chown user:apache -R /wordpress and chmod 755 -R /wordpress. But this might be a red-herring.

  12. Arne Brachhold
    Member
    Plugin Author

    Posted 9 months ago #

    Somewhere there is still a white space left. Please see here for a possible workaround if you can't find it.

    http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/help/#P221_gwtinvxml

  13. gnosis_wp
    Member
    Posted 9 months ago #

    Using a child theme?

  14. vijaylathiya
    Member
    Posted 8 months ago #

    same issue i fetch. for this issue it is clear that somewhere blank space exist. to solve i suggest 2 solutions
    1. Find out white space / line break and remove it
    2. WordPress leading whitespace fix @ http://wejn.org/stuff/wejnswpwhitespacefix.php.html

Reply

You must log in to post.

About this Plugin

  • Google XML Sitemaps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic