Move Wp-Content Folder To Different Location

WordPress Security

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 you can define in the wp-config.

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To Newsletter

Get weekly updates to your email