Wordpress Errors – Save / Publish Post, Get 404 Error

Summary:
I was trying to publish a post the other day and every time I hit save or publish, I'd get a 404 error. Well, after a long search, I finally figured out what was wrong on my own.
buzz_button

Mother of God I just spent hours trying to figure out why I couldn’t publish a post I was writing…I kept getting a 404 error every time I tried to save or publish the post. So, I searched all over the place for an answer but to no avail. I poured through my server logs to find traces of a hacker, but again, no luck. Finally, I realized what it was…

While writing another post about the solution to another error in Wordpress, I referenced the htaccess file, but with a period in front. Apparently mod_security has some sort of problem with that and wouldn’t budget, so I had to leave out the period.

If you absolutely must include “htaccess,” but starting with a period, in your post, I think they solved the problem by turning off mod_security here, although I don’t think that’s the smartest thing you can do.

 
Bookmark and Share

3 Comments so far ↓

  1. jc says:

    This issue has to do with Mod Security on your server.

    I spent 40 mins troubleshooting this with my host.

    You need to whitelist certain files in your wp-admin area. Or, if you can, whitelist all of the files in wp-admin.

    DO NOT use the mod_sec workarounds that seem to be posted several places on the web.

  2. Brian says:

    Hi, thanks for the advice on this issue. I’m having the 404 problem on publishing. Very bizzare, if I remove one letter from a word it saves, if I add it back it wont!!!!

    Any information on how to ‘whitelist’ the wp-admin files?

    I’m on a VPS so I can get into the server fairly deep but I’m a newbie!

    Thanks.

    Brian


Leave a Reply

Email is required but will not be published. All comments are moderated and no-followed. Please do not use keywords or domains as names and do not advertise.