Title: Change wp-content
Last modified: August 19, 2016

---

# Change wp-content

 *  [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/)
 * Hi folks,
 * I’m looking forward to change wp-content.
 * In wp-settings.php I’m looking at wp_initial_constants. Setting ‘WP_CONTENT_DIR’,’/
   home/user/some-dire’ didn’t worked out…
 * Can you please give me a hand here?
 * Thanks!

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/change-wp-content/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/change-wp-content/page/2/?output_format=md)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715658)
 * Follow this guide:
 * [http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content](http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content)
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715669)
 * Well I’ve read that, but I can’t understand if the define should go INSIDE the
   wp_initial_constants or not.
 * I’ve added the defines at the end of the wp-settings.php and it really didn’t
   worked…
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715674)
 * All you have to do is edit just the `wp-config.php` file.
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715675)
 * Oh, so the defines should be done in wp-config, not in wp-settings?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715677)
 * Correct.
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715678)
 * Ok, thanks a lot!
 * I’ll get back if something goes wrong.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715679)
 * You’re welcome!
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715680)
 * Bummer!
 * Warning: array_keys() [function.array-keys]: The first argument should be an 
   array in /home/remedia/public_html/wp-includes/theme.php on line 513
 * In the wp-config.php I’ve added, just before the ?>, the following lines:
 * define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/public_html/files’ );
   
   define( ‘WP_CONTENT_URL’, ‘[http://www.re-media.ro/files&#8217](http://www.re-media.ro/files&#8217););
   define( ‘WP_PLUGIN_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/public_html/files/plugins’);
   define( ‘WP_PLUGIN_URL’, ‘[http://www.re-media.ro/files/plugins&#8217](http://www.re-media.ro/files/plugins&#8217););
   define( ‘PLUGINDIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/public_html/files/plugins’);
 * I’ve tried:
    /home/user/public_html/files and /public_html/files
 * Both settings generate the above error.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715681)
 * Unfortunately, though you can move the `/wp-content/` directory, you can’t change
   its name.
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715682)
 * Oh, so the single thing I can do is move wp-content to files/wp-content? The 
   idea was to move the entire wp-content to files in order to secure the site…
 * If I can move wp-content, but I can’t change its name, than it’s the same thing
   as leaving it where it is, as a hacker can take a fast look at the source code
   and see if he can find wp-content. He doesn’t cares if wp-content is in /files
   or in the rootir…
 * So, as a final “product”, I’m looking for a way to rename wp-content and “hide”
   the fact that the website is using WP, for security reasons.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715684)
 * That’s correct. It’s really more of a convenience thing (having the directory
   where you want it) than a security thing.
 * Unfortunately, too many plugins and themes rely on the directory being named /
   wp-content/.
 *  [postrophe](https://wordpress.org/support/users/postrophe/)
 * (@postrophe)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715748)
 * Hi,
 * How about making a **copy** of your invisible ( .htaccess ) file, and moving 
   it to the root of your site. ( /public_html/your site name )
 * Pierre
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715749)
 * [@postrophe](https://wordpress.org/support/users/postrophe/) can you please be
   more explicit?
 * I was thinking at a symlink, but that will not fix the fact that WP will still
   post /wp-content/ in its source link…
 *  [postrophe](https://wordpress.org/support/users/postrophe/)
 * (@postrophe)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715750)
 * Hi,
 * My [test site](http://pierrecote.fondationcem.org). Try to add ( wp-content/)
   in the address bar !
 * You find a blank page.
 * Pierre
 *  Thread Starter [Razva](https://wordpress.org/support/users/razva/)
 * (@razva)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/change-wp-content/#post-1715752)
 * Yeah, but if you look at the source, you can still find /wp-content/ there…
 * The idea here is to hide any “wp-trace” from the source. If an attacker knows
   what CMS are you using…you are extremely vulnerable.
 * So the story here is to completely hide “wp-content” from the source, not just
   move or restrict paths.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/change-wp-content/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/change-wp-content/page/2/?output_format=md)

The topic ‘Change wp-content’ is closed to new replies.

## Tags

 * [wp-content](https://wordpress.org/support/topic-tag/wp-content/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 28 replies
 * 6 participants
 * Last reply from: [Manuel Schmalstieg](https://wordpress.org/support/users/targz-1/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/change-wp-content/page/2/#post-1715877)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
