I came across a strange error today. It only seemed to occur since I’d transfered a blog to a new webhost recently. I did my usual database backup and the transfer went well until I tried to modify some files from within the Wordpress admin area itself. I kept getting a Error 406 Not Acceptable when I tried to edit or change anything at all! This was very strange, I had never seen this error before. This had to be a web server issue I figured.

And sure enough after a bit of searching on the internet a solution was found on the UrbanGiraffe website. The Mysterious Error 406 article on the Urban Giraffe website clearly illustrates the problem. It occurs because of the Apache module called mod_security. This module acts like an Apache firewall, blocking a lot of the usual routes that people use to hack websites and displays a 406 Error for anything unusual. So that’s it! It appears that my new web server’s mod_security, when configured aggressively, can cause problems in CMS’s like Mambo, WordPress and other web scripts.

Wordpress Error 406 Fix

The solution is simple. The lines of code shown on the left can be added to your .htaccess file to disable mod_security.

Obviously you will lose any benefits that mod_security module had, but this works great for a quick fix to the 406 Error problem on your blog.