Mar 112016
 

All In One WP Security And Firewall Custom Rules helps you customize any rule that writes to the .htaccess file. This customization will not get deleted when you update the plugin in the future.

Last Updated: May 12, 2017

This plugin has some very powerful security features but some of them might not allow you to display or work with your site more freely. However you might still want to enable the security feature. The Custom Rules tab will allow you to do just that. This adds more flexibility to the plugin without loosing any security features.

What You Need:

  • FTP program I recommend Filezilla FREE (Some might use cPanel File Manager)

All In One WP Security And Firewall Custom Rules Steps

Please read the warning below before you carry out this steps. This warning is posted in the plugins Custom Rules feature for your own protection.

Warning: Only use this feature if you know what you are doing. Incorrect .htaccess rules or directives can break or prevent access to your site. It is your responsibility to ensure that you are entering the correct code!

If you break your site you will need to access your server via FTP or cPanel “If you use an Apache Server” and edit your .htaccess file and delete the changes you made.

Step 1 ) Click on WP Security -> Firewall -> Custom Rules to activate and configure the following security settings. (Added in version 3.9.7)

  • Enable Custom .htaccess Rules
  • Enter Custom .htaccess Rules
  • Click on Save Custom Rules button once you have completed your customization.

all-in-one-wp-security-firewall-custom-rules

Increase Upload Limit

Step 2 ) This post will show you how to increasing the 10 MB upload default limit set up when you enable Enable Basic Firewall Protection:. This is located in WP Security -> Firewall -> Basic Firewall Rules. 

Once you have enable the above mentioned rule, ftp into your site and download the .htaccess file locally to your computer or laptop. Open up the file for editing with a plain text editor like notepad in Windows 10 and locate the following entry, as illustrated below.

This is what you will copy and paste into the Enter Custom .htaccess Rules as illustrated above in the image.

#AIOWPS_BASIC_HTACCESS_RULES_START
<Files .htaccess>
order allow,deny
deny from all
</Files>
ServerSignature Off
LimitRequestBody 10240000
<Files wp-config.php>
order allow,deny
deny from all
</Files>
#AIOWPS_BASIC_HTACCESS_RULES_END

Some of you might want to increase the limit or even reduce the limit. That is entirely up to you. In the settings above you can see the following entry LimitRequestBody 10240000. This is the value that you will change. Be careful with the value you enter. Test to make sure it works and does not produce any error messages.

Once you have copied the above, made your modifications and saved the settings then disable Enable Basic Firewall Protection:. This will make sure that when ever you update the plugin in the future, this custom rule will not be deleted.

Other Server Settings

Note: In some cases the above might not work for you depending on how your server is set up or what limitations your Host has set in place.

Please read the following instructions. (Quoted by James Huff in the forum)

  1. If you can edit or override the system php.ini file, increase the maximum file and post sizes. For example, upload_max_filesize = 10000M ; and post_max_size = 10000M ;
  2. If you cannot edit or override the system php.ini file, add php_value upload_max_filesize 10000M and php_value post_max_size = 10000M to your .htaccess file.
  3. If neither of these work, it’s time to ask your hosting provider to increase the maximum file and post sizes on your account. Keep in mind that most decent hosting providers allow this, and If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.

I hope the above helps you understand how to work with Custom Rules.

Click on the following link Allow Unlock Request to continue configuring the plugins settings.

If you have any questions please let me know. I will be updating this post from time to time. So keep coming back for the latest.

Enjoy.

Click on the following URL All In One WP Security And Firewall Plugin to return to the plugins menu

Manuel Ballesta RuizManuel Ballesta Ruiz is a web developer, Blogger and WordPress Enthusiast.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)