How to lock / unlock particular directory / folder via cpanel
Why is it important?
Locking / Unlocking a path is important as it helps us to prevent our site from malicious activities , upload certain files at the back-end, let it be uploading an image on WordPress, zipping & unzipping files in cpanel, or uploading of heavy files directly on cpanel.
How is it done?
- Go to the domain eg. www.example.com.
- Type cpanel at the end of the domain name, eg. www.example.com/cpanel.
- Enter the respective password and username.
- You will see a cpanel dashboard.
- On the dashboard click file lock option.
- After selecting the option, you will see operation, profile and path text-boxes.
- On operation text-box select lock/unlock.
- If locking select from profile drop-down select option as per your requirement, normally we use General.
- If unlocking leave the profile drop-down blank.
- Type in the path you wish to lock / unlock, by default the value is /public_html, which locks the entire website.
- Last submit and you will see a page that says to click to go back and a table that displays the entire operations performed on it.