Category Links keep reverting to 404 pages

#775688
  • Hi there
    My category pages keep reverting to 404 pages and the only way for them to work again is for me to flush my permalinks.

    I have raised the issue with your rank bot who gave me some instructions to follow and said I should come back if i still have issues

    Id like to ad that this only started becoming a hassle since I started using rank math.

    I would really appreciate your help

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

    I’m sorry to hear that you are facing issues with your category pages reverting to 404 errors, especially after starting to use Rank Math. Thank you for reaching out to us about this problem.

    Based on the information you provided, it seems like flushing the permalinks is a temporary solution to the problem. To address this issue permanently, you can follow these steps:

    1. Navigate to Settings → Permalinks in your WordPress admin area.
    2. Click on the Save Changes button once, even if you haven’t made any changes on the page.

    By doing this, you will flush the permalinks settings and potentially fix the problem with your category pages reverting to 404 errors.

    If the issue persists even after following these steps, please assign this ticket to a human agent using the available buttons so that we can further investigate and assist you in resolving this matter.

    Thank you for your patience and cooperation.

    Sources:
    Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math
    Solving Redirection Issues Using Rank Math SEO Plugin » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Common robots.txt Issues & How to Fix Them » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    Thank you for your patience.

    For initial troubleshooting, please try updating the Rank Math plugin to the beta version by following this guide: https://rankmath.com/kb/version-control/#beta-updates

    If you don’t see an update available, please go to Rank Math > Status & Tools > Database Tools > Remove Rank Math Transients > Remove transients. Then, clear your caches, server, and WordPress and check again.

    Once done, clear your website’s cache and check again if the issue persists.

    Let us know how this goes.

    Hi there
    i already have the latest beta version installed on my site
    So I’m not sure what ells I should be trouble shooting
    This issue started when I installed rank math and removed the category base and product bases
    Now I’m down to refreshing my permalinks on a daily basis
    So what are the next steps

    Hello,

    From the description you’ve shared, it looks like the permalinks are not sticking for more than a couple of hours and that’s why you’re facing this issue frequently. We’ve seen some similar issues in the past and the most common fix for this kind of issue is to refresh the permalinks programmatically.

    To do that, you could add the following snippet to flush the permalinks every hour and prevent the error from appearing:

    add_action('my_hourly_event', 'do_this_hourly');
     
    function my_activation() {
        if ( !wp_next_scheduled( 'my_hourly_event' ) ) {
            wp_schedule_event(time(), 'hourly', 'my_hourly_event');
        }
    }
     
    add_action('wp', 'my_activation');
     
    function do_this_hourly() {
        global $wp_rewrite;
        $wp_rewrite->flush_rules();
    }
    

    Here’s how you can add filter/hook 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.

    Hi there
    Thank you for the solution for this but i need to know if this is the only permanent solution to this problem
    its now reached a point where an hour in between isn’t enough and i still get 404 issues in between
    To be honest this problem only started when i started using rankmath and i removed the category base as per your recommendation – which i now deeply regret by the way – because of the problems I’m having with this
    There must be another solution

    Hello,

    While we can modify the code to flush your permalink at a closer frequency it is better to figure out the root cause of the issue.

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it could be caused by a conflict with one of your plugins/theme.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Here is a video you can follow as well: https://www.youtube.com/watch?v=FcIWRhcUP2c

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Let us know how this goes.

    Thank you.

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

You must be logged in to reply to this ticket.