Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there an easy way to change the words wp-content that show in the source code to xyz-content without breaking my site?
I want to do it for branding purposes.

I tried:

  1. Url rewriting but the original wp-content still shows in the source code.
  2. Doing a site download, find and replace and then re-upload but it takes over 24 hours with my server.
  3. The plugin Real-Time Find and Replace changes the words from wp-content to xyz-content quickly, but the css etc does not load.

Is there another way to do this?

share|improve this question
    
You tagged this Question as <multisite>. Are you trying this in a WordPress Multisite installation? If so, please edit your Q and add this information. –  brasofilo Jul 29 '12 at 23:35

1 Answer 1

up vote 4 down vote accepted

You can move the wp-content directory to a different location, which essentially renames it.

First, in your wp-config.php file, add this:

define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/folder/path/to/new/dir' );

And second, also in wp-config.php, add this:

define( 'WP_CONTENT_URL', 'http://yoursite.com/folder/path/to/new/dir');

You can read more about changing the wp-content dir on the Codex.

share|improve this answer
    
Thanks @Pippin, nice and clean! It looks like it worked! –  SamDom Jul 29 '12 at 22:19
    
Great, please mark the answer as accepted :) –  Pippin Jul 29 '12 at 23:25
1  
. Pippin and SamDom, check the [wp-hackers] part of this answer of mine regarding the safety of $_SERVER. . . . . . @SamDom Your Question only deals with one part of hiding/branding WordPress, that whole Q&A may be of your interest. –  brasofilo Jul 29 '12 at 23:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.