TechiePortal
  • Home
  • About
  • Contact
  • Sitemap

Why does WordPress rewrite .htaccess on its own ?

Navigation : Home » Uncategorized » 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. 404-errorI 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 !

Topics: Uncategorized | Posted by Alfred
Tags: 404 error, downtime, hosting, wordpress

Related posts:

  1. WordPress 2.3.2 released
  2. Firefox crash while adding image in WordPress – Fix
  3. Firestats.com – Best statistics system for WordPress
  4. Custom Social Networking code for WordPress
  5. How to get a WordPress / Akismet API key



About the Author of this post
The Author
Alfred is a Pilot & Tech blogger from Bangalore, India. He has worked with DSL providers like AOL, SBC, Verizon & Covad as a tech specialist. Currently he is pursuing a career in aviation.
View other post by Alfred

Discover and Share
StumbleUpon Digg del.icio.us Technorati Reddit RSS Feed
Take a moment to share this post on social networking sites !

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader. If you don't have a feed reader, you can always have these articles delivered to your email inbox every day. Click here to sign up.

Previous Post
Next Post

Trackbacks & Pingbacks

No trackbacks/pingbacks yet.

Comments

On a sidenote, ProjectWonderful kept sending me suspension notices on ad boxes due to downtimes. Sent them a mail and got replied within 30 min !!! Damn if only all networks had service like that.

Comment by Alfred on July 8, 2009 @ 5:42 am

Nice tricks…

Special the one about WordPress 404 error…. I looked it up at my own blogs, and I have learned something here.

Comment by Tilføj link on July 8, 2009 @ 7:22 am

I was in a similar situation as far as hosting, and I recently moved both of my blogs over to Host Gator (http://www.hostgator.com). So far I have no regrets, but like I stated, this is a recent change so it too soon to judge. Price is good though.
.-= Juscelino M. Acevedo´s last blog ..Weekly Recap =-.

Comment by Juscelino M. Acevedo on July 8, 2009 @ 10:56 am

So far so good, I haven’t had any problem accessing your site at all. It loads pretty fast in my opinion.

Comment by Strictly Online Biz on July 12, 2009 @ 7:06 pm

Wordpress have mod rewrite module which make blog post URL with editable from admin instead of post ID which is very important for Search Engine Ranking but your problem seems strange to solve by changing permalink. Maybe you used something special character in permalink which breaks the URL anyhow.

Comment by Modern Technologies on July 28, 2009 @ 1:03 am

Update since the comment bought up the topic

I found out that it was the fault of my old webhost (netwayweb/unitech. For some reason the .htaccess would be reset by the host. Finally changed over to bluehost and never had the problem since.

Changing the permalink uses the WordPress engine to rewrite the htaccess file ;)
thats the easy solution, you could write htaccess yourself if it was blank and you know how to..

Comment by Alfred on July 28, 2009 @ 2:59 am

We’re hosted at Bluehost but we are having the almost identical problem: every time we fix the .htaccess file, WP rewrites it a few days later: and then the site crashes with a 505 error. It’s like WP is committing suicide!

Comment by Newt on August 5, 2009 @ 8:47 pm

That just happened to me, with all my posts redirecting to the home page. Luckily I found your fix. I will sleep tonight. Thank you!

Comment by alaJoAnn on April 18, 2010 @ 11:03 am

Thanks for dropping your comments alaJoAnn.

Knowing that I was able to help someone makes my day :D

Comment by Alfred on April 18, 2010 @ 10:36 pm

Leave a comment

(required)

(required)



Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to RSS Feed
1581 Subscribers
Signup for our Free Email Newsletter, No Spam

Meet the Author
The Author
Alfred is a Pilot & Tech blogger from Bangalore, India. He has worked with DSL providers like AOL, SBC, Verizon & Covad as a tech specialist. Currently he is pursuing a career in aviation.

Connect With Us
Follow us on Twitter Join us on Facebook Fav us on Technorati
iPhone Theme for Windows Mobile
  • Recent Posts

    • Best Alternative Music player for Windows – List
    • 12GB free online storage with sync capability
    • Best Defrag software – Top 5
    • Blizzard Authenticator PC version – How to
    • Add effects to video from our webcam
  • Categories

    • Audio / Video
    • Browser
    • Cell Phone
    • Contest
    • Email / IM
    • File Conversion/Storage
    • Gadgets
    • Games
    • How To
    • Music
    • Phones
    • Photo & Video
    • Security
    • Software
    • Tech News
    • Technology
    • Tips & Tricks
    • Uncategorized
    • Website Reviews
    • Windows
  • Social Bookmarking

  • Interesting Sites


  • best registry cleaner
  • Posts by Tags

    antivirus audio browser crash download dvd Email / IM facebook file file storage firefox free Gadgets google microsoft mobile phone mp3 music download phone photo Security social networking Software task manager USB video vista Windows windows mobile wordpress
TechiePortal | Disclosure | Sitemap | Design by Nathan Rice | web counter