What is the File Locker system and how does it work?

The File Locker system is a part of the Scans & Integrity Zone 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
  • Theme functions.php
  • Root .htaccess
  • Root index.php
  • Root Web.Config 

    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:

  1. Shield scans your installation for your index.php, wp-config.php and .htaccess files in your top-level WordPress installation directory and also your theme functions.php file.
  2. For any files that are found, the Shield will request an OpenSSL Public Key from the ShieldNET API.
  3. 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.
  4. Shield will monitor these files and if they’re modified, or deleted, you’ll be alerted.
  5. You can then view the precise changes from within the Shield Scan section and compare them line-by-line.
  6. 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 index.php file. 

The first thing to do is to go to the Scans & Integrity Zone > File Scans and Malware > File Locker > and select "Root index.php" 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 > Results > 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.

File Locker changes email alert

Shield’s File Locker scanner will normally alert you to the changes via the standard Report Alert feature.

However, you can be instantly alerted as soon as a File Locker changes have been discovered by using Instant Alerts feature.

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.