• Resolved George

    (@giorgos93)


    Hi, I’ve just noticed, that my category-sitemap.xml and page-sitemap.xml sitemaps are not updated for a long time.

    For example, page-sitemap.xml still contains a page, that was deleted from my website several days ago. And it also didn’t add a page, that I created in September (the page doesn’t have noindex).

    And category-sitemap.xml still has a subcategory, that was removed from my website, so it’s a 404 page.

    Please, help to understand, why these sitemaps aren’t automatically updated. At the same time, post-sitemap.xml works fine, and updates everything.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @giorgos93,

    Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.

    For initial troubleshooting, please make sure that your sitemap is not getting cached. Please follow these steps:

    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. If the above steps don’t seem to work, kindly apply the following filter code to your site.

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');<br>
    Here’s how you can add filter/hooks to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Thread Starter George

    (@giorgos93)

    Hi, @jaideeprm

    The first step did work, thanks! Do I need to implement the second step as well then? The problem is definitely with my caching plugin (WP Fastest Cache)?

    Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @giorgos93,

    It is recommended to follow the second step to make sure that the issue doesn’t occur again. If the second step doesn’t work, then you should follow the third steps to completely disable the sitemap cache.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Hi!!

    I have the same issue in one installation. In my case, I already tried the 3 options. In this case, we are doing a push content to the live installation from a staging every day with WP Migrate. But disabling the cache, I understand that the sitemap should be generate when the query is done right?

    Previous a couple months ago, I don’t have this issue. Something occur in the last version about it, but when I did the installation, the plugin worked fine.

    Thanks!

    Plugin Support Jeremy

    (@jeremrm)

    Hello @soivigol,

    Thank you for reaching out and providing the details.

    We haven’t made any recent changes to the sitemap functionality in Rank Math, so the behavior you’re seeing is not related to a new update. The sitemap should be generated dynamically every time you visit it if the caches are disabled.

    Since you’re pushing content from staging to live every day using WP Migrate, it’s possible that some transient or cache data is being carried over or interfering with the sitemap generation. This could prevent deleted pages or categories from being removed and new ones from being added.

    We suggest always following the steps above whenever you push your content from staging to live.

    If the issue persists, we will need to check this further on your site. Please email our support team at support@rankmath.com so we can assist you further.

    Looking forward to helping you.

    Thanks for reply @jeremrm

    We make some changes to exclude fine the cache, and now, it’s working fine.

    Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @soivigol,

    We are glad that the issue has been resolved.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Thread Starter George

    (@giorgos93)

    Hi, @jaideeprm . 2 months ago I’ve excluded the sitemap files in my WP Fastest Cache plugin. At first the content was shown updated in sitemap, as expected. However, I’ve just rechecked, and again my category-sitemap.xml and page-sitemap.xml sitemaps are not updating for some time.

    I’ve just added add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’); in my functions.php file, and all the sitemaps were immediately updated. However, if I remove the code, then it immediately shows previous dates of updates in sitemaps.

    My question is: should I keep the code in my functions.php on an ongoing basis? If yes, then are there any cons of this method, or it’s okay to keep the sitemaps’ cache always disabled?

    Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @giorgos93,

    If using the filter fixes the issue, it means that your sitemap is being cached. You should keep the filter to make sure that the sitemap updates without any delay. The only downside of using the filter is that it can increase the loading time of sitemap if you have a lot of posts and taxonomies that are being included in the sitemap.

    Please do not hesitate to let us know if you need our assistance with anything else.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.