Hello,
We apologize for the issue you are facing with the old post types still appearing in your XML sitemaps. It sounds like you’ve already taken several steps to troubleshoot this issue, which is great.
Here are a few additional steps you can try:
-
Flush Permalinks: Sometimes, simply flushing the permalinks can resolve issues with sitemaps. Go to Settings → Permalinks in your WordPress dashboard and click Save Changes without making any changes. This can help refresh the sitemap generation.

-
Check for Caching: Ensure that any caching plugins or server-side caching are cleared. Cached versions of your sitemap may still be showing old URLs.
-
Check Robots.txt: Make sure that there are no rules in your robots.txt
file that might be affecting the visibility of your sitemaps.
-
Inspect Database Entries: If you have access to your database, check the wp_postmeta
and wp_posts
tables to ensure that there are no lingering entries related to the old post types.
If these steps do not resolve the issue, please reply to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for raising this concern, and we appreciate your patience as we work to resolve it!
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
In this case, please follow these steps to flush your sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/
3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/**
* Filter if XML sitemap transient cache is enabled.
*
* @param boolean $unsigned Enable cache or not, defaults to true
*/
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how this goes.
Thanks, changing the number of URLs in a Sitemap did the job!
kind regards
Hello,
Glad that everything has been sorted out.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.