403 Forbidden Errors on WordPress (Apache with Modsecurity)

The Problem

Modsecurity is enabled and you’re receiving 403 forbidden errors when making edits on WordPress.

The Fix

Create or edit ModSecurity config in Apache located at /usr/local/apache/conf.d/mod_security.conf and paste the code below at the end of file.

<LocationMatch "/wp-admin/">
SecRuleRemoveById 300013
SecRuleRemoveById 300014
SecRuleRemoveById 300015
SecRuleRemoveById 300016
SecRuleRemoveById 300017

You can find additional rules at

Tested on


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.