Twice a day pages give 404 error
-
This post is out of hope and desperation in case anybody has encountered anything similar and has managed to fix it permanently, but I will be thankful for anything that might help me even hint at the cause. Apologies in advance if this turns out to be long.
Basically, about 4 months ago, my site (a page is linked) started having frequent 404 errors on every page (or serving stale pages from the cache); following tips found in many places, I discovered that resaving permalinks cleared the problem; however, since then it has been happening every day, and I eventually figured out that it was happening twice a day, 12 hours apart, at (UTC time) 01:30 and 13:30. This regular pattern immediately made me suspect either a cron job or something occurring on the server. On checking the cron jobs (I already had WP Crontrol installed) there was no single cron that ran at both times, and about 3 that ran once at either of the times. I have been in contact with my (shared) host as well, who suggested it might be the ht-access file or a plugin that triggered a cron.
I have worked through all the troubleshooting steps recommended and suggested to me so far (deactivating cache and security plugins, changing to a basic ht-access, stopping wp-cron and running it from a cPanel cron job instead, checking error log, running debugging, installed Query Monitor, checking browser console, deactivating plugins, changing theme etc etc), and I also added a function to my child theme to flush the permalinks on a regular basis as well as track the 404 errors, but obviously this just hid the problem rather than find the root cause, and a month ago I set up a clone of my site (staging site) on the same server to be able to troubleshoot the issue without disrupting the live site as much. However, the issue doesn’t occur on the staging site, despite everything being exactly the same. This effectively rules out it being a server issue, as well as custom code, theme or plugin problem, or even a WordPress issue, which has me completely stumped. The fact that it occurs at such regular moments and not any other time should be the clue to unlock the puzzle but I have run out of ideas, and am completely baffled as to why it doesn’t also occur on the staging site.
So if anyone has any ideas, thoughts, suggestions or random bits of info that might help me resolve this, I’m all ears.
For what it’s worth, I am running on WP 6.3, child theme of Blocksy, with Buddypress and a large number of plugins, all kept up to date, but given what I have written above, I’m not sure they are worth listing, but if someone would like to see I can post them as well.
I should also mention that I am using PHP 8.1, and the server uses Apache 2.4.57 and MySQL 10.3.39-MariaDB (I know WP now gives a site health check warning about this being out of date, but the issue started before that).
The page I need help with: [log in to see the link]
- The topic ‘Twice a day pages give 404 error’ is closed to new replies.