How to rename your wp-content Directory
Last updated on December 26th, 2015 at 10:25 pm
Secure your WordPress site by renaming wp-content
Some bloggers running WP want to add one more security layer and hide their wp-content from script kiddies by renaming to wp-content2 or to whatever they wish to.
If you want to join them follow my short guide below:
Access your wp-config.php located in the root of your WP site and edit it by adding the following lines:
Then Save and Refresh.
If you just installed WP then this is the only thing you have to do, on the other hand if your site was already alive and kickin then you should go and update all of your posts that host media uploaded via the WP Media Manager.
This extra step is necessary because when a media file(for ex. an image) is attached to any of your posts then its stored by default to the wp-content directory so if you rename that directory then all of your posts should be updated with the new path that hosts the attached media.
Latest posts by Makis Mourelatos (see all)
- Extra Hardening: Take care your HTTP Security Headers - May 15, 2017
- WordPress Hacked Redirect, How to Detect and Clean it - January 2, 2017
- 7 WordPress Maintenance Mode Plugins – Which One Stands out? - November 21, 2016