Fix WordPress ‘Error 406’ or ‘Not Acceptable’

How to fix ‘Error 406 – Not Acceptable’ in WordPress.

I have been getting the following error while writing a new blog post.

I kept on getting the error message when trying to save a post. Similar problem can appear with different message like:

“Error 406, Not Acceptable. An appropriate representation of the requested resource /wp-admin/post.php could not be found on this server”

Reason: Error 406 is caused by your webhost and has got nothing to do with you. Most of the webhost that offers shared hosting installs ModSecurity, an open source web application firewall runs on Apache to protect their servers from you abusing it and also from being hacked by hackers by using a bunch of rules. If a site, page, or function violates one of these rules, server may send the 406 Not Acceptable error.

So if you are having a similar problem then you can try one of the following methods to fix it.

Option 1: Edit the .htaccess file of your website. You can find it in the your CPanel. Got to File Manager and then to public_html folder, you can see .htaccess file. Add the following lines just before your existing script.

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

Option 2: Disable ModSecurity form CPanel. Login to your CPanel and click the ModSecurity in the SECURITY options.

 

Now, you should have the option to disable ModSecurity. If you got multiple domains under the same account, you can have option to disable it for individual domains.

 

And, that’s it. Now you should be able to post without Error 406.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.