TechEnhance

Managing a backend team seems like too much work?

Here are 12 automations and workflows that can replace your entire backend team

Table of Contents

Would you like to share this article?

Wordpress 406 Error Solution

The Best Way To Fix Error 406 in WordPress Site

Here is Resolution for Error 406 in WordPress

Error 406 in WordPress

Sometimes we get Error 406 in WordPress site and below solution helps most of the time.

We see “406 not acceptable error” largely due to restrictions on the web server.

Most web hosts install a program called “ModSecurity” to protect the web server from malicious actors like spammers, hackers etc.

ModSecurity generally block malicious requests to the web server with a “406 not acceptable error”. But often it blocks legitimate requests as well.

Recently in one of the VPS server that we manage, we saw ModSecurity blocking a genuine request. On trying to Publish a WordPress post, website owner was presented with the error.

To fix the error 406 in WordPress, our Support Engineers analyze the ModSecurity logs and that helps to identify the exact rule that caused the block.

If the request from browser is genuine and ModSecurity wrongly blocked it, we disable this particular rule for the domain.

When selective disabling of rules do not work, the only option left is to Turn OFF ModSecurity completely for the domain.

In cPanel servers, there is an option to do this from the cPanel of the domain.

First of all take backup of your .htaccess file (If you are in linux hosting make sure you have checked “show hidden files” by going to site settings ( in cpanel). If there is no .htaccess file then create one and paste below code and save it.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Hope this will help. Happy coding.

Get in touch for a free consultation

Get in Touch Now!
Ankit Tayal
AUTHOR

Ankit Tayal

(Founder & CEO, Techenhance)

A journey that started with passion for Technology, also led Ankit towards mastery of Business. With 16+ years of experience in the IT industry working with organizations like Accenture and PwC he has gained mastery over the crafts of leadership, customer relationship management & business partnership. He dreams to build a world that has adapted tech with efficiency & confidence. To achieve his dream Ankit invests his days & nights into the growth of TechEnhance & its clients.

Related Blogs

Good move, automating your backend!
Please enter your email to access the guide.