How to Stop Access to Sensitive Files of Your WordPress Website?

How to Stop Access to Sensitive Files of Your WordPress Website? [EASY GUIDE]☑️

Today in this tutorial you will learn how to secure and harden your WordPress website by denying the access to sensitive files of your WordPress. As you know, WordPress has some sensitive files, which can break the whole website, it’s essential to secure such files. Core files like .htaccess, wp-config.php, and more play a vital role.

The wp-config.php is responsible for making a connection between your website’s data and its database, and if something goes wrong, your site can’t remain intact. But before getting started it’s necessary to back up your whole website and its database. Having a backup secures you from losing your data, and you can restore it anytime you want.

Before beginning this tutorial you can also Watch this video on “How to Stop Access to Sensitive Files of Your WordPress Website”

Follow the steps to Secure the Most Important WordPress Core Files:

Step::1 Login to cPanel and search for the File Manager icon.

How to Stop Access to Sensitive Files of Your WordPress Website

Step::2 Next you need to open the public_html folder, where all of your core files and folders are available.

How to Stop Access to Sensitive Files of Your WordPress Website

Step::3 Search for the .htaccess file and right-click to Edit.

How to Stop Access to Sensitive Files of Your WordPress Website

If you don’t find the .htaccess file, you have go to Settings at the top-right corner of the screen, and check to box to display hidden files.

How to Stop Access to Sensitive Files of Your WordPress Website

Once you click on the Edit option, a popup displays, from which you need to click on the Edit button to authenticate that you are sure about editing the .htaccess file.

How to Stop Access to Sensitive Files of Your WordPress Website

Step::4 You need to copy and paste the code given below

<FilesMatch "^.*(error_log|wp-config.php|php.ini|.[hH][tT][aApP].*)$">
    Order deny,allow
    Deny from all
    </FilesMatch>

How to Stop Access to Sensitive Files of Your WordPress Website

Step::5 Click on Save Changes and Close the file.

Knowing the importance of all sensitive files is very essential for a WordPress user. So, be prepared to have the backup and secure such files using .htaccess. I hope, it’s an easy task.

For more information, kindly follow us on social media like Twitter and Facebook and for video tutorials, subscribe to our YouTube channelhttps://youtube.com/redserverhost.com

Facebook Page https://facebook.com/redserverhost

Twitter Pagehttps://twitter.com/redserverhost.com

Thanks for Reading this article !!! We hope this was helpful to you all.

If you have any suggestions or problems related to this video, please let us know via the comment section below.

Tags: cheap linux hostingbuy linux hostingcheap reseller hostingbuy reseller hostingbest reseller hostingcheap web hostingcheapest web hostingcheapest reseller hosting,  cheap reseller hostcheap linux hostcheapest linux hostingbest linux hostingbest web hosting

 

Scroll to Top