Secure WordPress by renaming the wp-content folder –

Secure WordPress by renaming the wp-content folder -

[ad_1]

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'); 
define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ;

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.

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/'); define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);

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.

Epilogue

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!

0
0
voice

Rate items



[ad_2]

Recommended Posts