WordPress Hanging When Saving Post

wordpress hanging on save

It’s 2:30AM and you just finished writing an awesome blog post. You are ready to share it to the world and hammer social media with the great post. You hit the final save.. and it spins. WordPress is hanging. All you are trying to do is save your WordPress post.

Saving…

Your WordPress

wordpress hang on post

NOW WHAT? With WordPress hanging, so much for posting after all that work! However, there is a fix. There always is a solution!

Here are a few other things you can consider checking. I say consider, because it did not help me.

  • Check your permissions on the server to ensure the proper ones are present.
  • Check the database for any issues
  • Turn off any caching plugins
  • Moreover, disable all of your plugins and see if there is a conflict with one of them
  • Above all, reboot your server (haha sorry had to)
  • Turn off the CDN, and go direct to the server. Did that stop wordpress from hanging?

Similarly, it just so happened that I actually had this issue while working on the blog post about an error while running a shell command. In that particular post, I mention a code that I was having an issue with. This particular code was actually tripping the mod security on the server.

The issue I wrote about on that post had an actual linux query, which mod security was looking as if it was an exploit. When WordPress tried to save, it blocked the save because of that shell command.

That being said, the actual issue for WordPress hanging was that it was tripping REQUEST_URI.

ModSecurity: Access denied with code 403 (phase 2). 
Match of "rx (alt_mod_frameset.php|checkout_shipping.php|
^/components/com_zoom/etc/|/admin\\\\.swf\\\\?nick=
|/editor/filemanager/browser/default/browser\\\\.html\\\\?
(type=image&)?Connector=\\\\.\\\\./\\\\.\\\\./connectors
|/phpthumb\\\\.php\\\\?((?:w|h)=[0-9]+&)?((?:w|h)=[0-9]+&)?src= 
..." against "REQUEST_URI" 
required. [file "/etc/apache2/conf.d/modsec2/10_asl_rules.conf"]
 [line "219"] [id "340009"] [rev "61"] [msg "Atomicorp.com 
UNSUPPORTED DELAYED Rules: Protected Path Access denied
in URI/ARGS"] [data " /bin/"] [severity "CRITICAL"]
[hostname "askshank.com"] [uri "/wp-admin/post.php"]
 [unique_id "YDFcuL0OUDu73wmoT@1@-gAAAK8"], 
referer: https://askshank.com/wp-admin/post.php?post=821&action=edit

To clarify, the fix stop stop WordPress hanging is to whitelist which you do in the file here /etc/apache2/conf.d/modsec2/whitelist.conf

<LocationMatch "/wp-admin/post.php">
  SecRuleRemoveById 340009
</LocationMatch>

Once this code was added, I was able to successfully save my WordPress post and publish my article. No more WordPress hanging on save.

Conclusion to WordPress Hanging

To sum up, sometimes the issues that you have cannot be solved with a simple code change or plugin. Its deeper than that, server level in this case. Ultimately I was able to solve the issue with WordPress hanging fairly quickly. The right host will have a great support team that you can rely on to get the job done for you. But, the job done quick, and first time right requires the perfect host.

Leave a Comment

Your email address will not be published.