Troubleshooting: Beaver Builder hangs every time I click Publish or Save
When you make edits to a Beaver Builder layout and find that Publish or Save consistently hangs, it may be because of a mod_security issue on your hosting server.
Usually (though not always), this happens when you add some custom code to one of your modules, such as adding an
<script> tag, but it has even been triggered by using the word select in a Text module.
Mod_security is an Apache module that serves as a web application firewall. When you save or publish a page, a POST object is sent to the admin Ajax, and it is scanned by modsec if mod_security is enabled. Tags like
<script> (non-UTF-8 characters) or words like select, which Is a keyword used in MySQL queries, can be interpreted as a security threat and produce a 403 or 406 error in Ajax, causing the Save or Publish to hang.
You can find out whether your hosting server is using mod_security by asking your hosting provider or, if you know PHP, by using
phpinfo(). Note that a 406 error usually indicates that mod_security is in use.
Try adding the following line to the wp-config.php file in your WordPress home directory:
define( 'FL_BUILDER_MODSEC_FIX', true );
This line causes the request to be base64-encoded so modsec sees the offending tags and text as binary data and allows it to pass through.