Move your wp-content folder in Wordpress

To Make your website more secure from Hackers,  We can move wp-content folder which  contains your themes, plugins and uploads. Few plugins uses wp-content to store

their cache data.So we can make it more difficult for people to find your wp-content directory by moving it to another area of your website.

To Move wp-content folder to another location, Add this code into your wp-config.php file


define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/customfolder/wp-content' );

"Replace customfolder with your folder name (don't use special characters or Capital letters as your Folder name) "

You can add new location using the URL as shown below

define( 'WP_CONTENT_URL', 'http://www.mywebsite.com/customfolder/wp-content' );

Otherwise you to rename your wp-content folder using below code

define ('WP_CONTENT_FOLDERNAME', 'customfolder');

Moving or Renaming your wp-content folder can make WordPress website more safer, But not always because many WordPress plugin developers continue to write “wp-content” in their plugin code which may effect on plugin functionality. For such plugins we need to update manually if securing your website is your main priority!!.

No comments:

Post a Comment