1

One of the wordpress sites that I created recently went down with a 500 internal server error. After hours of mind boggling and checking error logs, I found out that the htaccess files present in the user directory had been modified, with an ss added to the end of the file which caused the error. After changing and uploading the file, the site got back up.

I wanted to know what could have caused this? It is hosted on a godaddy server, and the permission for the file is 604. was the server hacked or did wordpress somehow write this into the file.

Thanks.

1

This might happen when the rewrite rules are flushed. The function insert_with_markers() is using fopen(), but not flock(), so when two pieces of code are calling flush_rewrite_rules() almost at the same time, the second process can write to that file before the first one has closed it.

Check your plugins and your theme for flush_rewrite_rules(), especially those registering custom post types or taxonomies. Some poorly written plugins are calling this on every page load. Disable that plugin.

1
  • thanks for this. I will go through my plugin files to see where this functions is called. May 22 '13 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.