Secure WordPress by renaming the wp-content folder –

Secure WordPress by renaming the wp-content folder -


How to secure WordPress by renaming the wp-content folder?

As you know, in a website using WordPress source code then all image files, stylesheets, themes or plugins are by default in the folder wp-content.

What if you rename this folder to something else? Is your WordPress site still working? The answer is that it will still work fine if you follow my instructions below.

Instructions for renaming the wp-content folder

Step 1: Go to the folder containing the web and rename the wp-content folder with a new name, for example I will change the new name to hocwordpress

Step 2: Configure the wp-config.php file
Open the wp-config.php file find the line

require_once(ABSPATH . 'wp-settings.php');

Insert the code below above.

define ('WP_CONTENT_FOLDERNAME', 'hocwordpress'); 

The theme thumbnail in the theme folder is not displayed, which means that the theme displayed outside the main website is also not displayed due to lack of stylesheets, images, etc.

Fix it by inserting these 2 lines of code in the next position of the 2 lines of code above.


With just 4 simple lines of code above, you have renamed the wp-content folder to a new name. Once the name change is complete,
All downloaded files are downloaded to a folder whose path is the name of the new folder.


So I shared how to secure WordPress by renaming wp-content folder.

If you find it interesting, you can follow the wordpress tips section to learn more new knowledge.

Follow the fanpage to receive the latest articles: Hocwordpress Group

I wish you to have interesting and interesting knowledge about wordpress!


Rate items


Recommended Posts