Support » Plugin: Yoast SEO » XML Sitemaps printing commented out data

  • Resolved sproutchris

    (@sproutchris)


    My Yoast-generated XML sitemaps are working per usual and doing what they’re supposed to do, but then after the XML, it is also printing tons of extra data. It looks like it added a print_r() PHP function or something that prints out all of the data, including SQL queries, and it seems like a bad idea security-wise and certainly completely unnecessary and causing a performance lag to load them.

Viewing 1 replies (of 1 total)
  • Hi @sproutchris

    I think that’s enabled debug mode – https://codex.wordpress.org/Debugging_in_WordPress

    I recommend to you set WP_DEBUG_DISPLAY to false. Example for wp-config.php:

    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', false);
    define('WP_DEBUG_LOG', true);
    

    Also, if you see define( 'SAVEQUERIES', true ); in wp-config.php then sitemaps contains dump of all queries (for debug purpose if WP_DEBUG_DISPLAY is true). You should remove this line and maybe install plugin query monitor for debugging purpose.

    Regards,
    Sasa

    • This reply was modified 3 years, 5 months ago by Saša.
Viewing 1 replies (of 1 total)
  • The topic ‘XML Sitemaps printing commented out data’ is closed to new replies.