Disable the Creation of .htaccess File for WP Statistics Upload Directory

By default, WP Statistics creates a .htaccess file in its folder inside the upload directory to prevent direct access to the files. You may want to disable the creation of this .htaccess file to avoid unnecessary costs associated with S3 storage for example.

Disabling the Creation of the .htaccess File

You can add the following hook to the functions.php file of your active theme to disable the creation of the .htaccess file:

add_filter('wp_statistics_enable_htaccess_protection', '__return_false');

Let’s get started
Take your business to next level

Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.