Securing Your WordPress Website: Protecting the wp-content Folder

thumb_up 1  ·  sell WordPress wp-content folder protection, Safeguarding wp-content directory in WordPress, How to secure wp-content in WordPress site

How to Protect the wp-content Folder of Your WordPress Website? [STEP BY STEP]☑️

Today in this tutorial we will make you learn how to protect the wp-content folder of your WordPress website in just few simple steps. So let’s get started!!

 

Step::1 Login to your cPanel account and open the File Manager under Files.

 

Step::2 Open the root directory/public_html

 

Search for wp-content, click to open

 

Step::3 The folder consists of many directories from which, you need to open the uploads folder.

Also See: Enable Two Factor in cPanel




The UPLOADS directory has all the media files of your WordPress website. You can see the arrangement after opening it.

Step::4 Here you have to create a new file, click on +File showing at the top-left corner of the main navigation menu of cPanel.

 

Step::5 A popup appears, which require you add the file name. Make sure you don’t forget the dot as a prefix of the .htaccess file.

 

You can see the path of your wp-content/uploads directory. For now, click on the Create New File button.

 

Step::6 Refresh the page, and you can see the .htaccess file. As always, you need to right-click to edit it.

 

A new tab appears to you. You can see an empty file because it’s just a text file, unlike the main .htaccess file, it doesn’t contain the rewrite rules.

 

Step::7 Add the code given below

# Kill PHP Execution
<Files ~ ".ph(?:p[345]?|t|tml)$">
deny from all
</Files>

Step::8 Click Save Changes button and close the file.

 

This code will stop PHP execution in wp-content/uploads directory.

Also Read: Information Feature in WHM



The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.

Was this answer helpful?

Related Articles

description

How to Resolve the Issue of "Missing Add New Plugin Menu" in WordPress?

Here, in this tutorial we will discuss the procedure to fix an issue called “add new Plugin Menu not showing” in WordPress. This issue…

arrow_forward
description

How to Incorporate a YouTube Subscribe Button into Your WordPress Website?

Here, in this tutorial we will discuss the procedure to add YouTube subscribe button to your WordPress website. This can be done by any of…

arrow_forward
description

How to Deactivate WordPress Plugins Using the Database?

We have shared articles managing WordPress website and its data. One of the most important feature of WordPress is Plugins that allows user…

arrow_forward
description

How to Integrate a Currency Converter into Your WordPress Website?

The diverse features of WordPress allows user to manage the website presentation in their own choice. WordPress has themes for blogging…

arrow_forward
description

Guidelines for Installing and Setting Up the WordPress Simple PayPal Shopping Cart Plugin

Features in WordPress allows user to improve and manage the presentation of website. We have shared multiple articles related to WordPress…

arrow_forward
arrow_back « Back