This is a doozy, you’ll like it. Since about a week ago, when I edit a post, if that post contains a hyperlink (eg <a href="...">...</a>) when I update it, I’m sent to the 404 “Page not Found” page, and the post is NOT saved. Here’s a video: https://drive.google.com/file/d/1OQZ9k5f_jxbxsT4SEyD-pH28FSIMoQlT/view.

I added some debug code to wp-admin/post.php to see if it’s getting called when the POST request is sent, and it isn’t. The request is somehow going to index.php, and there’s no URL rewrite for that, so it becomes a 404.

I was suspicious that the plugin “Auto Affiliate Links” was the culprit (https://wordpress.org/plugins/wp-auto-affiliate-links/), because it changes hyperlinks to be affiliate links, and was having some error. But the error still happens when after I’ve deactivated the plugin.

In fact, I temporarily switched the site to a use a fresh DB (all default settings), with default (twenty seventeen) theme, NO plugins active, and I still get the same problem. However, when I copied the directory containing WordPress’ files to a local copy (running VVV), I did not get the issue.

So it seems very unlikely that it’s a plugin causing the issue, because the issue persists with all plugins deactivated, and even on a fresh DB (so they couldn’t have changed something in the database). The only way a plugin could be the culprit would be if they changed WP core FILES, right? But if that were the case, I would have expected to reproduce the issue when using those same files on my local VVV site. Right?

I don’t think it’s a WP configuration issue because I get the same issue on a fresh install of WP.

I was suspcious that maybe it was a .htaccess issue, but here’s my vanilla htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Looks pretty regular, right?

The last possibility, I think, is the hosting company, uniserve (https://www.uniserve.com/) has something running on the webserver that’s intercepting the request for /wp-admin/post.php and instead sending it to /index.php, but only when the post content has a hyperlink in it. Maybe it’s an attempt at blocking some spammers from creating posts with backlinks to their site or something.

2 Answers 2


Try these - Have you checked your php error_log ? - You have already tried disabling plugins and stuff, try changing the default theme and see if you still get this error - Check the code for instances of save_post hook , if any, which might be causing trouble https://codex.wordpress.org/Plugin_API/Action_Reference/save_post - turn on wp_debug, add a save_post hook to die after saving post and check the page for any errors

  • Thanks for the tips. error_log reported nothing of interest. The default theme also had the same problem. Turning WP_DEBUG on didn't reveal any thing while saving posts (there were a few warnings on other pages, though). The post wasn't actually getting saved, so hooking into save_post didn't reveal anything. All good suggestions on things to check, though. Commented Feb 20, 2018 at 23:34

I created a duplicate issue in the WordPress support forum. There we explored the issue a bit more, and the issue seems to be from the hosting company's mod security directives. So we're going to move the site to a new host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.