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.

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

Site Footer

Sliding Sidebar

RYAN OUN

Nice to meet you, my name is Ryan and I build stuff for the web. Welcome to my website where you can learn about me and my interests.

USEFUL LINKS