X

Why does WordPress rewrite .htaccess on its own ?

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

  1. Login to your WordPress Admin area (http://yourdomain.com/wp-admin)
  2. On the right menu click on Settings
  3. Now click on Permalinks
  4. If you are using a custom permalink copy it
  5. Change the permalinks to a different type and save
  6. Change the permalinks back to the old setting
  7. 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 !

Rate this post