Receiving a 403: Forbidden error when attempting to save snippets through the WordPress dashboard seems to be often caused by the Apache mod_security module. If this is an error you are experiencing, the first step is to check whether you are using this module on your site. If you are not sure, you can check with your web host to confirm.

If you are using Apache mod_security and would like to keep doing so, this specific rule appears to be the rule which causes issues with Code Snippets:

rules/REQUEST-949-BLOCKING-EVALUATION.conf

Removing this rule from your mod_security configuration should prevent this error from occurring on your site.

IMAGE