If you have a working WordPress website that suddenly starts reporting one or more 404 errors (page does not exist) across its pages, I hope I have a solution for you.
I say “hope” because I can’t guarantee this suggestion works for everyone. All I know is it worked for me, so I hope it works for you too.
The solution I used was really simple, and relatively harmless so I never went through the backup process. If you’re concerned about breaking your site, you should create a backup before moving forward. I used a service called VaultPress to back up some of my sites. I also rely on my hosting company, Vidahost, to back up a couple more.
If you don’t use either of these methods, try a trustworthy and regularly updated plugin.
In all honesty though, you probably don’t need to go that far. Take a look at the solution below then decide for yourself.
Okay. This is what I did when my site suddenly started reporting 404 error across all pages.
Go to Settings > Permalinks and make a note of the structure you’re currently using (taking a screenshot works if you don’t pen and paper to hand).
Choose an alternative permalink structure and hit save.
Change the permalink structure back to its original state and hit save again.
Now check to see if the page returning a 404 error is working.
If it is, great. If it isn’t, I’m afraid you’ll have to dig a little deeper for a solution. Start with your hosting company.
Please let me know in the comments if this worked for you.