Notes

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
</LocationMatch>

You can find additional rules at jparks.work

Tested on

Apache/2.4

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.