How can I prevent a 406 error when uploading in WordPress?

It can happen that you get a 406 error message when uploading, for example, an image or posting a new article in WordPress. This message comes from the mod_security module in the Apache web server.

The mod_security module provides security for WordPress, Joomla and many other types of scripts. It does this by checking every request that comes in for your website. If mod_security recognizes certain patterns in it that could be used to exploit security issues, it rejects the request with a 406 error code.

Unfortunately, mod_security is sometimes wrong (a so-called false positive). You can recognize this by checking the error log of your website.

Are you running into this? Then we can have mod_security disabled for you. Just send us an email via the Ask a question option in the control panel.

Related articles