Changing wp-content to other name? Multisite set up

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?

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.

Leave a Comment