Wierd title huh ! Its true. This is the second time WordPress has automatically overwritten .htaccess file with its own blank version. Once this happens you can visit your main page but trying to open any post page will result in a 404 error. I spent the whole day wondering why my visitors were so less, kept sending mails and tickets to my hosting company about it too. Finally realized that this was due to a combination of site downtime and the 404 error for posts. Having gone through this error twice on this blog before and once for my Mom’s blog, I immediately corrected it with the fix I will share below. Anyways my hosting is was also bad, too many downtimes on their part.
Fix for WordPress 404 error on posts but homepage opens
- Login to your WordPress Admin area (http://yourdomain.com/wp-admin)
- On the right menu click on Settings
- Now click on Permalinks
- If you are using a custom permalink copy it
- Change the permalinks to a different type and save
- Change the permalinks back to the old setting
- Voila your WordPress posts are working again !
I have setup a post page for monitoring on Montastic. Should save me a lot of trouble the next time this happens. So people lets hear about some good cheap hosts !