A lot of WordPress Plugins allow direct access by typing in the url in your browser. Depending on the situation, this could be a potential security threat that could allow your site to be hacked. Today’s snack will show you how to stop people from being able to access your Plugin files directly.
Just enter this code below into your .htaccess file. Remember to back up your .htaccess file before you edit it.
<Files ~ ".(js|css)$"> order allow,deny allow from all </Files>
We obviously can’t guarantee this will help prevent your site from being hacked, but it could help.
Leave a Reply