-
Hi
I opened a card a few weeks ago:
https://support.rankmath.com/ticket/category-links-are-broken-404I thought the problem was solved and therefore the ticket was closed.
The problem is back and I don’t know how to open it again.
Thanks!
-
Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.
In this case, we might need to take a closer look at the settings again. 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.
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.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
When this issue happens the links are broken temporarily and then back again after re-saving the permalinks or increasing the server limits which means that the website is losing the permalink structure and their set redirections.
Currently, the categories are working on the website with our plugin enabled, but if they hit a 404 again you might need to perform a new flush of the permalinks.
To debug this issue you can install the WP Control plugin and check if there’s a scheduled action that might be triggering this.
Don’t hesitate to get in touch if you have any other questions.
Hi
I installed the plugin you mentioned.
A few minutes before I sent this post there was a 404 error and I tried to understand something from the plugin data, but without success.Are the server limits still not enough?
I tried to understand what is meant by “flush of the permalinks” but I also realized that there are several options for this.
It feels like there is nothing to be done about it.
Hello,
Checking your website here, currently, the category pages aren’t throwing any 404 on our end.
Once a 404 issue occurs on your end, please visit the Cron Events page right away, check the recent scheduled action and share it here so we can determine if that action may have caused the issue.
Looking forward to helping you.
Hi
Yesterday, a few minutes before the last error, the following HOOK appeared:woocommerce_cleanup_draft_orders
group rank-math.
status Pending .
Recurrence – Every 1 dayI don’t know if this will help but I will attach the WooCommerce status report.
Hello,
Please take a backup of your .htaccess file and replace it with the default WordPress .htaccess file. You can get the file here: https://wordpress.org/support/article/htaccess/
You can follow this guide to edit the .htaccess file:
https://rankmath.com/kb/edit-htaccess/If the 404 still persists, please contact your web host and ask them to set the following value to at least:
PHP max input variables: 1000Let us know how that goes. Looking forward to helping you.
I’m sorry but I didn’t understand what to do about .htaccess file.
I saved a backup. Should I open a new file that will contain only this?
Basic WP
# BEGIN WordPressRewriteEngine On
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule. /index.php [L]# END WordPress
————-
And about PHP max input. Isn’t 1000 too low for the limit? And can it affect performance?Thanks.
Hello,
Yes, that is the default
.htaccessfile, or you can take a backup of your.htaccessfile, don’t create a new one and head over to your WordPress Dashboard > General settings > Permalink, and save the settings without changing anything. WordPress will then generate the default.htacccess.As for the PHP max input limit, if you believe 1000 is too low for you, you can go ahead and increase that further.
See if these recommendations will resolve the issue. Let us know. We are here to help.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
ok i will try it.
I noticed in the meantime that there is another Scheduled Actions that repeats a lot:
wc-admin_import_customers
Complete
0 => 1
wc-admin-data
Non-repeatingAnd I noticed that there is Scheduled Actions that appears after I turn RANKMATH off and on, and everything is fine again-
action_scheduler/migration_hook
Hello,
Could you please add the following code snippet on your website to flush the permalinks automatically?
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(); }After that, check if the pages are still getting random 404 errors with the settings from our plugin enabled.
Looking forward to hearing back from you.
Sorry for not being sure –
Should I add this in the theme’s functions.php?
ThanksHello,
You can use one of the methods mentioned here, the one that suits your workflow better: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Don’t hesitate to get in touch if you have any other questions.
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.
The ticket ‘links-are-broken-404’ is closed to new replies.