Excluding Files and Folders from Malware Scanning
Security by CleanTalk includes a powerful Malware Scanner designed to detect suspicious and malicious code on your website. However, in some cases, it is both safe and recommended to exclude specific files or directories from scanning.
Exclusions let you fine-tune scanning by skipping locations that are known to be safe, irrelevant, or managed separately. This helps reduce false positives, speeds up scanning, and prevents unnecessary resource usage.
In this article, we explain how file and directory exclusions work in Security by CleanTalk, including how to use the spbct_directory_exclusions.txt file and provide practical examples of when and why exclusions should be applied.
You can find the exclusion option in our plugin settings:
- WordPress Admin Page —> Settings —> Security by CleanTalk —> General Settings —> Directory and file exclusions for the malware scanner.

Examples of Usage
Below are practical examples of exclusions. A key rule applies to all: excluding a directory will also skip all its subfolders and files. Use any directory separator (/ or \) in your paths. Separate each path with a new line. You can specify both directories and files.
Excluding unnecessary files and folders
To further optimize scanning, exclude non-critical directories and individual files that don't require security checks, such as development or log files.
Example exclusions:
wp-content/uploads/dev/script.phpwp-content/themes/test-themewp-content/logs
Excluding Nested Websites
In some environments, a single hosting account may contain multiple websites located in subdirectories, for example:
site1.com/
├── site2.com/
└── old-site/
Directories containing other websites should be excluded. This prevents unnecessary resource usage. Each nested website should be scanned by its own instance of Security by CleanTalk.
Example exclusions:
site2.comold-site
Excluding backup directories
Backup folders often contain copies of your website’s files. Scanning these duplicates can trigger false alerts and consume unnecessary resources.
Example of exclusion:
wp-content/backups
Note: your backup folder path may vary. If it is different, specify the correct path to it.
Excluding cache directories
Cache folders store temporary data generated by plugins, themes, or server-side caching systems. These files are dynamic and not part of the original codebase, so scanning them may lead to irrelevant results.
Example of exclusion:
wp-content/cache
Note: your cache folder path may vary. If it is different, specify the correct path to it.
Excluding via a Special File
Create a file spbct_directory_exclusions.txt with a list of folders you want to exclude from the security checks.
Example of such a file:
ignore me
woocommerce
wordfence
contact-form-7
Then upload it to any public place, copy-paste its URL to the field "Directory exclusions for the malware scanner" and save the plugin settings.
Example:
https://website.com/public/spbct_directory_exclusions.txt
The plugin will recognize the content of the file and inform you about it in the tooltip:

You can follow the same process using a file named spbct_allowed_domains.txt containing the list of domain names you wish to exclude. Simply create the file, upload it to a publicly accessible location, and paste its URL into the "Allowed domains" field.
Example:
goodwebsite.com
testwebsite.net
notgoogle.org

Couldn't find what you were looking for? Contact our technical support team for assistance.
It would also be interesting
- Free trial Alternative to Wordfence.lp-container { line-height: 2; } .lp-container ul, .lp-container ul li { line-height: normal; } ...
- Extra Package for CleanTalk Security ServiceExtra Package for Security Service 45-Day Log Custom Text for the Security FireWall Website Access...
- All Installation Manuals of CleanTalk Anti-Spam ServiceCleanTalk Anti-Spam Installation Guides Here you can find our plugin installation guides for popular...