What is the File Locker system and how does it work?
The File Locker system is a part of the Hack Guard module of the Shield Security plugin.
It detects changes to the some of the most important WordPress files as they happen (in realtime). Then, lets you examine contents and revert as required.
The files covered with File Locker system are
- WP Config
- Root .htaccess
- Root index.php
Note: Web.Config is Windows/IIS only. To enable this feature, you'll need to be on IIS web server. If not, this will show as "unavailable".
WordPress File Locker is best explained in the release article here.
How does the File Locker system work?
The following is a brief outline to how Shield‘s WordPress File Locker system works:
- Shield scans your installation for your index.php, wp-config.php and .htaccess files in your top-level WordPress installation directory.
- For any files that are found, the Shield will request an OpenSSL Public Key from the ShieldNET API.
- If a public key is obtained from the API, Shield (on your site) makes a copy of the file contents and encrypts them using the public key, and stores it in your WordPress database.
- Shield will monitor these files and if they’re modified, or deleted, you’ll be alerted.
- You can then view the precise changes from within the Shield Scan section and compare them line-by-line.
- Once you’ve decided whether these changes are good, or bad, you can then accept the changes, or restore the file to its original state.
For example, let's say you want to lock your wp-config.php file.
The first thing to do is to go to the Hack Guard module > File Scans and Malware > File Locker > and select WP Config file option:
If this file is modified, you'll be alerted by email.
Important: To receive this type of email alert, please ensure that you have this enabled in the Reporting section of the plugin here.
Then, you can go to the Scans section > File Locker, and you'll see that this file is flagged in red.
When you select this file to review, you'll be presented with the original and modified file content so you could compare them line-by-line and decide whether you want to accept the change, or restore the file to its original state.
We also highly recommend you to read A Complete Guide To The Shield Security Scans here.
Note: ShieldPRO is required for this feature. To find out what the extra ShieldPRO features are and how to purchase, please follow this link here.