How to Rename Wp-Content Folder In WordPress

The issue of renaming wp-content is set by those who want to use WordPress to hide or protect themselves from malicious bots that are constantly trying to hack a site, means of access, through standard WordPress directory.

On my site already has an article about – how to hide the version of WordPress , so that the article can also be attributed to this category.

Just like the folder to rename the wp-the content, which lies at the root of a site on WordPress you cannot, because it will lead to malfunction of the engine. In order to have everything by the rules and worked as it should, you need to specify WordPress to rename and set the parameters.

To do this, open the configuration file – the wp-the config.php and begin to look for the following line:

1 require once (ABSPATH . ‘wp-settings.php’);

And in front of it add a new configuration.



define ( ‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’ );


The second line specifies the new name of the folder NEW FOLDER NAME, and then you need the same name as the folder to rename the wp-content.

Using this method remember one important rule. You will change the way the themes and plugins. If the routes to them are prescribed functions, there is no problem, but if the path is registered manually, it is necessary to change to a new, or something simply will not work. For example, you have a thread the path to the picture

wp-content / themes / tema / images / img.jpg

now, it will be so.

novoe_imya_papki / themes / tema / images / img.jpg

The same situation is with plug-ins. 95% of developers of plug-ins, make them like that should be no problem, but all the same it is sometimes such that the plugin does not work. If you have the skills, you can search in the plugin code and correct the path or use its equivalent, and the old abandoned.

To use this method or not, you decide. Effective method, but it requires care not to disturb the operation of the site.

That’s all, thank you for your attention.

Add a Comment

Your email address will not be published. Required fields are marked *