Ever since WordPress version 2.6 you can actually move your wp-content directory to a different location. The wp-content directory will store all your theme files, plugin files and images. Why Move The wp-content Folder The best reason to move the wp-content is for security if you move this to an unexpected location any hackers looking to target this area won’t be able to find it, or it will make it more difficult to find. To change the location of the wp-content is quite simple as the location of this folder can be configured in your wp-config.php file. One thing to note is that you need to add these new constant variable above the line where WordPress includes the wp-settings.php. All you have to do is add a new variable WP_CONTENT_DIR and change the location of your wp-content folder. To change the location of the wp-content URL there is another variable…

 

 

Add code in wp-config.php

 

wp-content

define( ‘WP_CONTENT_DIR’, dirname(__FILE__) . ‘/XYZ/wp-content’ );
define( ‘WP_CONTENT_URL’, ‘http://xyz.com/XYZ/wp-content’ );

 

Plugins

define( ‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/XYZ/wp-content/plugins’ );

define( ‘WP_PLUGIN_URL’, ‘/XYZ/wp-content/plugins’ );

Your site will open from  XYZ/wp-content/