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?

  • 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, 2012 at 23:35

2 Answers 2


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.

  • Thanks @Pippin, nice and clean! It looks like it worked!
    – SamDom
    Jul 29, 2012 at 22:19
  • 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, 2012 at 23:44

Once you define WP_CONTENT_DIR and WP_CONTENT_URL ,your images may still uploaded to old wp-comtent/uploads path to change this go to settings -> media and change the Store uploads in this folder url. Thats it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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