Generating Sitemaps

#474055
  • Resolved Ouadie Dev
    Rank Math free

    Hi,
    RankMath does not generate new sitemaps when creating posts programatically using “wp_insert_post” function.
    It does update sitemaps when adding posts manually !! but using the code no change happened
    is there a solution ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    Please follow the steps below:

    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. Kindly apply this filter code to your theme’s functions.php file.

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');

    Let us know how that goes. Looking forward to helping you with this one.

    No, it is not a caching problem !
    RankMath generates new sitemaps every time I create a new post from admin panel. It works just fine
    The problem is when I added new posts via a custom plugin that I developed RankMath doesn’t generate new sitemaps.
    it is like rankmath doesn’t detect that a new content was created.
    is there something I should add to my code to be able to tell rankmath to generate new sitemaps

    Hello,

    I tried using the wp_insert_post function from my end and it seems to be working just fine (please don’t mind the duplicate generated posts).

    After firing the function, the post URL was added to the sitemap right away as you can see in my video screencast: https://i.rankmath.com/v/Kldq7F

    If the issue persists on your end, please let us know. We are here to help.

    Looking forward to helping you.

    Thank you for your time sir,
    I Tried several times and the same problem persists.
    I turned off sitemaps feature on RankMath and install another plugin that generates sitemaps and it worked.
    Maybe there is something in my theme that prevent rankmath from making sitemaps but It’s ok now I’ll keep this as it is. RankMath for SEO and the other plugin for sitemaps
    I appreciate your help so much 🙏

    Hello,

    Could you please let us know the name of your plugin and what files contain the function?

    Also, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Ouadie Dev
    Rank Math free

    Hello,
    The problem occurred in a plugin that I am developing right now. Not a public plugin!
    Everything is ok, sitemaps are handled by another plugin
    And RankMath is doing SEO just fine
    Thanks once again

    Anas
    Rank Math business

    Hello,

    If you have any questions in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Generating Sitemaps’ is closed to new replies.