› Forums › XML Sitemap & Google News › XML Sitemap › Fatal error to install XML Sitemap plugin › Reply To: Fatal error to install XML Sitemap plugin
2 December 2019 at 09:20
#17844
Rolf
Keymaster
Or, if you are not afraid of modifying PHP files, you can try this:
1. Go to Plugins > Plugin Editor and select XML Sitemap & Google News on the top right.
2. Open >models in files list on the right en choose the file functions.public-shared.php
3. There you will see the first function:
function xmlsf_headers( $headers ) {
// set noindex
$headers['X-Robots-Tag'] = 'noindex, follow';
$headers['Content-Type'] = 'text/xml; charset=' . get_bloginfo('charset');
return $headers;
}
Now add a new line right after function xmlsf_headers( $headers ) {
and enter $headers['Status'] = '200';
there. It should look like:
function xmlsf_headers( $headers ) {
$headers['Status'] = '200';
// set noindex
$headers['X-Robots-Tag'] = 'noindex, follow';
$headers['Content-Type'] = 'text/xml; charset=' . get_bloginfo('charset');
return $headers;
}
Then click the button Update File at the bottom.
Let me know and I’ll check the response status of your sitemaps again 🙂