I face a error problem, i used WordPress SEO plugin, when i enable xml site map and visit my sitemaps list http://localhost/sitemap_index.xml then show this error
see screenshot http://prntscr.com/8ffuph
I have already tried lot of tips in WordPress directory and stackoverflow
but I’m not successfully, because I’m beginner level in PHP. please help me.
Check your themes functions.php file and other plugins for trailing whitespace (or opening whitespace) outside of the tags. I think something is outputting whitespace before the SEO plugin has a chance to display the sitemap and that is the most likely cause.
if it’s happened on WordPress, you need to edit your functions file and remove whitespace (or opening whitespace) outside of the tags at the start and end and save the file
problem resolved ðð
Instead of examining and fixing all your plugins manually, which can be cumbersome if you have a lot of them installed, you can try if this plugin does the trick:
https://github.com/xemlock/wordpress-seo-sitemap-fix
I wrote it a while ago for this exact purpose – to overcome this tiny, but annoying, implementation flaw of the WordPress SEO plugin.
I had this problem as well when I wanted to use the SEO plugin sitemap.
It is more commonly happens in
functions.php
:functions.php
.?>