406 Not Acceptable error on your WordPress website?

2 Flares Twitter 1 Facebook 0 Google+ 1 Filament.io 2 Flares ×

Are you getting 406 Not Acceptable error on your WordPress website when trying to save some of the settings or posts? Recently I encountered the same problem and dug up most of Internet websites and WordPress forums to find the solution of the problem. I tried almost everything, all the changes, but finally got a simple, silly cause of the problem and successfully got it solved. I hope my experience will help others who come to similar problem, because WordPress is the most popular and most widely used platform to create the websites and blogs.  Here is the story of the nightmare:
406 Not Acceptable WordPress Error

How I Encountered The Problem

Once I tried to update settings of All In One SEO plug-in on WordPress. Clicking on ‘Save’ opened a page with 404- Not Found error. When I clicked browser’s back button to go to WordPress admin back, and refreshed the page, I noticed that the settings were not updated. I tried searching on Internet for this error with that plug-in, but could not find such a single problem.

I thought it was a plug-in problem so I tried re-installing the plug-in. It did not help. I thought to leave that plug-in and install some alternate plug-in that could work. But the plug-in which I already had was one of the best one available.

Temporarily I found a way to update settings for that plug-in directly in MySQL database, using Update query. Then I thought to wait on this.
After a few days, I tried updating an existing, old post on WordPress and saw the same 404 error. I also tried updating other posts- some updated successfully and some showed the error.
Now I understood that something was wrong in WordPress and not only with that plug-in.

I tried editing contents of a particular post randomly and tried updating it. I noticed that it had problems with some keywords like src=”http://. If I remove such keywords, the post would be updated successfully! I found similar kinds of complains in various forums.

Now my extensively mad search for the solution began on Internet. I could afford an error in one plug-in but not on multiple settings and posts! I read almost all possible changes for the solution of this problem.

1. The first and most recommended possible solution

The most recommended possible solution I found was to add settings in .htaccess file to disable mod_security plug-in. Mod_security is a security plug-in installed on Linux/Apache server on which your domain is hosted). I tried adding following settings in .htaccess file, but it did not help:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off

2. Disable All Installed Plugins

As another solution suggested a lot, I tried disabling all plug-ins installed and tried. This could not help. I also tried deleting all the plug-ins.

3. Duplicate WordPress Installation

I created a new parallel, duplicate website on my domain as a sub-domain. I copied all files of my existing website and copied existing MySQL database to a new database. I encountered same problem in that website also.

4. Trying Another Theme And Identifying Correct Error Code!

I also tried changing theme of existing website. Now I was getting 406 – Not Acceptable error which was the real error. The current theme was wrongly showing only 404 error. It was actually 406 and 404 additionally (See the image). Now I re-started the search with 406 instead of 404! Here is the full description of the error:

Not Acceptable
An appropriate representation of the requested resource /wp-admin/[Page Name].php could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

5. Re-installing WordPress

I remembered that I purchased a new reseller plan from my hosting provider last week, hosted on a Linux/Apache server, to renew my soon expiring domain. I thought this problem might be raised because of transfer of files andspecially MySQL database. I thought of starting a new WordPress installation.

I downloaded latest WordPress version and created a new WordPress setup on the sub-domain, with new database. Still no improvement. I also downloaded and installed the previous version, still it did not help.

As an extreme step, I also deleted all existing (main) website and database, installed a new setup and fresh database. Still same problem.

6. Finally, mod_security on Hosting Server Was The Problem

I noticed on 2 or 3 articles on website, it was suggested to contact hosting provider to disable the mod_security plug-in for my domain, which they install on Linux/Apache hosting servers. and this could solve the problem. As the last possible solution, I emailed them. They replied me notifying of the change and the problem was solved immediately!

2 Flares Twitter 1 Facebook 0 Google+ 1 Filament.io 2 Flares ×


  1. says

    Great blog here! Also your site so much up very fast! What host are you the usage of? Can I get your affiliate hyperlink on your host? I wish my web site loaded up as fast as yours lol

  2. says

    I also found the same error when posting a comment in my blog.
    May be it caused by plugin upload image for wp comment.

    I was just contact the admin hosting to disable the Mod_Security.

    Thank you for the clear explanation here.

  3. says

    Thanks for posting this. I was getting to believe myself this was a web hosting issue because all my 3 affected websites were pulling up fine in all the browsers, but the error has only become an issue because I was on a website checking back links and it shows Google throwing the error while crawling or trying to crawl the sites. They are all wordpress installs. I contacted my web host company and hopefully it is on their end. The code in all my .htacess files is:

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    Is yours more recent code or do you know?

Leave a Reply

Your email address will not be published. Required fields are marked *