It’s probably very similar issue as in old topics. There is some empty line in some PHP file which renders before WP template. You can follow instructions which you has already seen.
You could read more about similar issues:
https://yoast.com/help/xml-sitemap-error/
https://github.com/Yoast/wordpress-seo/issues/8394
https://github.com/Yoast/wordpress-seo/issues/7140
https://github.com/Yoast/wordpress-seo/issues/7105
…
I’ve already written following instructions:
Every page on your page (included sitemaps) contains empty line at the begin. (You can see HTML source) You should remove this line to fix sitemaps. You can try following steps:
- Check your
wp-config.php
file for blank lines outside of <? and ?> bracketed sections.
- Check your theme’s
functions.php
file for blank lines outside of <? and ?> bracketed sections.
- One by one, disable plugins and re-validate until you isolate the one causing the problem (How To Check For Plugin Conflicts)
Note that the final php ?>
should be omitted from all PHP code files – modules, includes, etc. (eg. wp-config.php
, functions.php
, …).
More instructions (related to first and second step) you can find on How_do_I_solve_the_Headers_already_sent_warning_problem. Try to re-save file without BOM (eg. you can use Notepad++ – Cannot modify header information – headers already sent by).
If you are still experiencing issue after switching to twenty seventeen (and deactivating all plugins except Yoast SEO), please check following:
If you still can’t find where are empty lines then you could go to my gists on github and download whitespace-test.php
(I just shared it on github). Upload this php file into directory where wp is installed and open in browser home_url/whitespace-test.php (home_url is full URL for your website). It should “simulate” ajax request (because it should prevent starting of output buffers), load wp bootstrap, send header and try to detect first output… It’s big change to locate file where is empty line. If it’s WP core file please reinstall WP files.