Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @shoppingkim,

    Thanks for using Yoast SEO. The XML declaration error typically happens when your site incorrectly outputs data at the beginning of the sitemap’s source code. I looked at your sitemap and saw that the first three lines contain white spaces before the sitemap source code, which shouldn’t be there. See screenshot. Although this could happen for several reasons, we usually see this when a space or a blank line appears before the <?php line in the wp-config.php or functions.php files.

    Thread Starter Shopping Kim

    (@shoppingkim)

    @maybellyne

    Okay no luck on finding the blank line.
    Checked in the wp-config.php file and the functions.php files in the:

    – /wp-includes/ folder,
    – the theme’s functions.php file,
    – or in the Yoast SEO plugin(/wordpress-seo/src/functions.php) folder.

    In all of the above, the “<?php” line is on line 1. And no spaces before.

    Anything else you’d recommend?

    Thread Starter Shopping Kim

    (@shoppingkim)

    some things learned:

    the error persist until switching back to the Twenty twenty five theme, all plugins remaining enabled.

    Going to recheck theme files

    Plugin Support Maybellyne

    (@maybellyne)

    Due to the nature of the issue, we’ll need to take a look at your setup. However, we are unable to do it here as this is a public forum. You could consider purchasing a Yoast SEO Premium subscription since it comes with email support. Then we can investigate the issue further directly on your setup privately.

    Thread Starter Shopping Kim

    (@shoppingkim)

    No thanks. I don’t want to pay for something that isn’t working

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

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