More fixes

WordPress: "406 Not Acceptable"

You click Update on a post, save a page builder layout, upload a file, or a visitor sends your contact form, and instead of saving you get "Not Acceptable! An appropriate representation of the requested resource could not be found on this server", or just "406". WordPress did not make that page. Your host's firewall (almost always ModSecurity) read the request, matched a rule, and refused it. Nothing on the site is broken; one rule is too strict for one thing you are doing. Here is how to prove it and get it fixed.

What the owner sees

harborbakery.example/wp-admin/post.php

What the checks found


  

Is it the firewall? (two minutes)

  1. Look at what you were sending. A 406 that appears for one post, one form message or one file, and never for others, is a firewall rule matching the content. Common triggers: words like select, union or exec next to code-like text, a pasted <script> or <iframe> embed, a long URL with query strings, or a file name with odd characters.
  2. Try a small test. Save a copy of the post with the suspicious paragraph removed. If that saves, the content tripped the rule.
  3. Check the host's log. In cPanel, Errors or ModSecurity shows the blocked request with a rule id number, the page, and the time. That id is what the host needs.

Fix it, safest first

  1. Ask the host to whitelist that one rule for that one page. Send the time, the page (for example /wp-admin/post.php or /wp-json/) and the rule id. A good host removes that rule for that path in minutes and leaves the firewall on everywhere else.
  2. If your panel has a ModSecurity switch (cPanel, ModSecurity, per domain), turning it off for a few minutes is a fair test: if the save works with it off, you have your proof. Turn it back on and use step 1 for the real fix.
  3. A security plugin can do the same thing. Wordfence, Sucuri and others run their own firewalls. If the block page names the plugin, check its blocked-requests log and allowlist that action there.
  4. Cloudflare or another proxy. If the block page carries a Cloudflare Ray ID, the rule is in Cloudflare's firewall, not the host's. Its Security, Events screen names the rule; add a skip rule for /wp-admin/.
  5. Visitors' forms fail. If messages with links or certain words never arrive, the same rule is blocking your contact form, and you lose enquiries without knowing. Send yourself a test message with a link in it after any fix.

What you see, what it means, what it needs

What you seeWhat it meansUsual fix
406 on one post, others saveContent in that post matched a firewall ruleHost whitelists the rule id for the editor path
406 when saving a page builder layoutLarge request full of code-like textRule whitelist for admin-ajax.php or /wp-json/
406 on a contact form with a linkVisitor messages blocked by the same ruleRule whitelist for the form's path, then a test send
Block page names a security pluginThe plugin's firewall, not the hostAllowlist in that plugin's blocked log
Block page with a Cloudflare Ray IDCloudflare firewall ruleSkip rule for /wp-admin/

What not to do

Most cases are one rule id and one message to the host. If you cannot find the log or the host will not help, that is what the box below is for. Related: 403 Forbidden, "Updating failed" / "Publishing failed", contact form problems.