Add parameters to Rank Math Sitemap query

#223012
  • Resolved Simplicity
    Rank Math business

    Hi,

    I’m using elasticsearch as a service to index contet and reduce mysql load.

    Rank Math does not use regular wp functions thus I can’t use elastic for generating sitemaps with Rank Math so everything ends up on mysql. I have around 1M posts and we add around 150 posts every day, so you get the point πŸ™‚

    Ia have sitemap cache enabled, but that doesn’t solve the issue when sitemaps need to be regenerated.

    I have houndreds of sitemap queries in the queue when regeneration starts.

    Is there something we could do to address this issue?

    Thanks.

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

    Thank you for contacting Rank Math today.

    Unfortunately, due to the way we currently generate the sitemaps we can’t add any parameters to that as it would require extensive changes to the core functionality of the plugin.

    Hope you understand.

    Don’t hesitate to get in touch if you have any other questions.

    Simplicity
    Rank Math business

    Got it.

    Another related question, if I may πŸ™‚

    If I use wp rankmath sitemap generate, and I’m using cache, how the processing goes, from the oldest to the newest or something else?

    And when you do sitemap update, do you update all of them or just the latest sitemap with most recent post/tags/cats?

    Thank you.

    Prabhat
    Rank Math agency

    Hello,

    If I use wp rankmath sitemap generate, and I’m using cache, how the processing goes, from the oldest to the newest or something else?

    The function invalidates the cache and then generates the sitemap as per usual starting from the latest posts.

    And when you do sitemap update, do you update all of them or just the latest sitemap with most recent post/tags/cats?

    Whenever a new post is added, it is placed on the 1st position of the post-sitemap and all the existing links are shifted 1 position downwards.

    So, during the addition of a new post, all the post sitemaps are updated.

    Hope that helps.

    Thank you.

    Simplicity
    Rank Math business

    Got it, thanks.

    One more and I’m off πŸ˜‚

    Is there a way to control how the sitemap regeneration goes, timings, so it doesn’t flood mysql with queries?

    If you now fetch 100 posts every X seconds, is there a way I could say fetch 1000 every minute, or 10 every second?

    Thanks.

    Hello,

    Sorry for the delay and any inconvenience that might have been caused due to that.

    There is no way to control the regeneration of the sitemap. As soon as the process starts Rank Math tries to finish it and only fails if an issue occurs like the server getting exhausted of memory. If there is no issue then the process will be completed as soon as possible.

    Hope this helps. Let us know if you need any further assistance.

    Simplicity
    Rank Math business

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Simplicity
    Rank Math business

    At a blank server, just with imported db, this query takes 1.3s

    I have 1M posts, so you can imagine how this feels when it starts rolling πŸ™‚

    I placed some additional indexes in fields in the db, but it didn’t help a lot, so my suggestion is to revise this query or to make the process rolling in a diferent way.

    Hello,

    We can check to see what we can do to improve the queries related to the sitemap but at the moment using the plugin “normally” with WordPress is already very performant do we need to be careful making changes to cater to a specific situation as that might introduce increased complexity that we would want to avoid.

    We appreciate your suggestions about performance and we are going to escalate this further to the dev team.

    If there’s something we can do about this in the future, rest assured that we’ll take a closer look.

    In case you have any other questions or require any further assistance don’t hesitate to get in touch.

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

You must be logged in to reply to this ticket.