Disable XML Sitemap Without Plugin to avoid duplicate sitemap issues and keep your WordPress SEO clean. Here’s how to do it with a simple tweak.
Step 1: Add the XML Sitemap Disable Code
Add this to your child theme’s functions.php:
// Disable default WordPress XML Sitemap
add_filter(‘wp_sitemaps_enabled’, ‘__return_false’);
How It Works
This filter disables the default XML Sitemap WordPress includes by default since version 5.5+.
Why Disable XML Sitemap Without Plugin?
If you already use an SEO plugin like RankMath or Yoast, the core XML Sitemap is redundant. Having two sitemaps can confuse search engines and waste crawl budget.
Common Mistake
Don’t disable the core sitemap if you don’t have an alternative sitemap generator active. Make sure your SEO plugin creates one automatically.
Pro Tip
Place this tweak in your child theme’s functions.php so it stays safe after theme updates.
Related Snippet
If you liked this, check out my guide on disabling embed scripts without a plugin in WordPress.