How to Troubleshoot WordPress Plugin and Theme Conflicts
When a WordPress site breaks after you change a plugin or theme, two extensions may be clashing with each other. A conflict…
WordPress core and SEO plugins generate XML sitemaps so search engines can discover a site's URLs. A sitemap lists those URLs in an XML file, and a sitemap index lists the individual sitemap files. To build them, WordPress core or an SEO plugin selects qualifying content, splits the URLs into separate files, lists those files in an index, and serves the XML at public URLs.
Whichever sitemap system is active decides which content appears, how entries are formatted, and which URLs serve the files. WordPress core has provided XML sitemaps since version 5.5, while SEO plugins such as Yoast SEO and Rank Math offer their own generators. Each plugin exposes its own settings and developer hooks, which are places where custom code can change how the plugin behaves. When you troubleshoot or customize a sitemap, start by identifying which system serves it, then trace the setting or hook that controls the stage you want to change.
A sitemap generator starts by selecting content that qualifies for inclusion, such as posts, pages, custom post types, authors, or taxonomy terms (the labels used to group content). It then divides that content into sitemap files and builds an index that points to them. When a search engine requests an index or sitemap URL, WordPress or the active plugin renders and serves the XML.
WordPress core organizes this work around providers, which supply sitemap data for a specific type of content. Core includes providers for posts, taxonomies, and users, and developers can register additional providers with wp_register_sitemap_provider(). Because of this design, a plugin that adds a new content source can feed its data through a provider instead of rewriting the final XML.
Each generator sets its own file limits, because WordPress does not apply one shared limit across plugins. According to the WordPress core sitemap documentation, core defaults to a maximum of 2,000 URLs per sitemap and 50,000 sitemap files in the index, and developers can filter the URL limit. Yoast’s sitemap specification sets a default of 1,000 items per sitemap and creates additional files for overflow.
WordPress core serves its sitemap index at /wp-sitemap.xml. Yoast serves its index at /sitemap_index.xml, and when you turn on its sitemap feature, Yoast replaces the core sitemaps. Checking these paths helps you identify the active generator, though the URL alone does not confirm every plugin or custom-code interaction.
WordPress core provides the wp_sitemaps_enabled filter so you can turn its sitemaps on or off. Core also disables its sitemaps when the site discourages search engines from indexing it, unless custom code overrides that behavior. Yoast uses its own sitemap feature toggle. Whenever you change either setting, check which index URL responds and inspect the XML it returns. For more help confirming the active generator, see how to tell which plugin generates an XML sitemap.
You can control which URLs appear in a sitemap at several levels. You can exclude an entire content type, exclude individual items, or change the query that retrieves entries. If you exclude a post type, you remove all of its content at once. If you change a provider's query, you narrow or expand the specific items that the generator returns.
WordPress core lets developers add providers and modify the queries that fetch sitemap entries. Developers can use filters, which are hooks that let code change a value, to adjust the options WordPress uses to retrieve sitemap posts or to choose which providers it registers. You can find these hooks in the core provider function reference. SEO plugins maintain their own separate hooks. Yoast documents controls for post types, taxonomies, individual posts, authors, and terms in its XML sitemap API, and Rank Math documents its filters for sitemap content and entries in its developer hook reference.
Eligibility rules also differ by plugin. Under Yoast’s specification, the plugin excludes URLs with a noindex directive, manually changed canonical URLs, private or password-protected pages, and certain non-public archives and taxonomies. Rank Math takes a different approach and documents a filter that can include noindex URLs. Check your active plugin's rules before assuming that a URL's indexability decides whether it appears in the sitemap.
Plugins can also change how individual entries look, not just whether they appear. Yoast documents filters for changing post URLs, adding images, and adding external sitemap references to its index. Rank Math documents controls for changing URL entries and the sitemap base, as well as adding index entries or sitemap content.
According to the WordPress renderer reference, core's XML renderer handles the loc, lastmod, changefreq, and priority fields. Its documentation warns about other fields, so if you need richer entry data, verify that your active generator supports those fields rather than assuming WordPress core will preserve them.
Plugins also give you ways to control how they cache sitemap data. Rank Math documents filters for enabling or disabling sitemap caching and choosing its cache location and mode. Yoast documents a separate setting for bulk cache priming, which changes how the plugin prepares database objects while it generates sitemaps. When a plugin uses output caching, it stores the generated sitemap files. When Yoast runs cache priming, it changes how it loads data while building those files. Use the controls documented for your active plugin, and inspect the resulting XML after you change them.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com