Here’s how to do it:
- Open your WordPress dashboard and click 'Media'.
- Then, click on the grid icon and choose a file.
- Go to the 'Prevent Direct Access' section and click 'Configure file protection'.
- Then click, 'Protect this file'. By doing this, it allows you to protect your WordPress file.




