Follow the below guide to disable ModSecurity for your WordPress or DirectAdmin domain.

 

ModSecurity is typically enabled at the server level and applied to all domains on the shared hosting server. In some circumstances, particular rules might cause an application to break the site, and you might want to disable ModSecurity for that domain in the site's .htaccess  file.

As long as AllowOverride is permitted, you can place the following directives in .htaccess.

To disable ModSecurity :

<IfModule mod_security.c>
   SecRuleEngine Off
   SecRequestBodyAccess Off
</IfModule>

To disable an individual ModSec rule, use the following within the .htaccess

<IfModule mod_security.c>
  SecRuleRemoveById 1234567
</IfModule>
Was this answer helpful? 16 Users Found This Useful (390 Votes)