There is a 404 problem on the woocommerce Product category page

#964983
  • Resolved Ben Q
    Rank Math free

    RankMath on my site enables these three functions:
    Remove base
    Remove category base
    Remove parent slugs
    Then my website’s product collection page will occasionally appear 404 problems, this problem will fix itself. However, it will appear from time to time, which will greatly affect the website browsing experience.
    The wordpress version of my site is 6.7.1
    The site theme is hello elementor 3.3.0
    Elementor 3.27.3
    Elementor Pro 3.27.3
    woocommerce 9.6.1
    Rank Math 1.0.237

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

    We apologize for the issue you are facing with the 404 errors on your WooCommerce product category page. It seems that enabling the options to remove the base, category base, and parent slugs in Rank Math might be causing conflicts that lead to these intermittent 404 errors.

    Here are a few steps you can take to troubleshoot this issue:

    1. Check Permalink Settings: Ensure that your permalink settings are correctly configured. You can do this by navigating to Settings → Permalinks in your WordPress dashboard and simply clicking Save Changes to refresh the permalink structure.

    2. Clear Cache: If you are using any caching plugins, clear the cache to ensure that the latest changes are reflected on your site.

    3. Disable Options Temporarily: As a test, you might want to temporarily disable the options for removing the base, category base, and parent slugs in Rank Math to see if that resolves the 404 issues.

    4. Check for Conflicts: Sometimes, themes or other plugins can conflict with Rank Math. Try switching to a default theme (like Twenty Twenty-One) and disabling other plugins to see if the issue persists.

    5. Monitor 404 Errors: Use the 404 Monitor feature in Rank Math to track any 404 errors that occur. This can help identify specific URLs that are causing issues.

    If the problem continues after trying these steps, we recommend replying to this ticket so a human agent from the Rank Math Support team can assist you further with this issue.

    Thank you for bringing this concern to our attention!

    Hello,

    Please monitor the issue and once it happens, head over to your WordPress Dashboard > Settings > Permalinks, and hit the “Save Changes” button (without making any changes) to clear the permalink cache.

    If the issue was fixed by saving the permalinks, 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/

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘There is a 404 problem on the woocommerce Product category page’ is closed to new replies.