1

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?

fuxia
  • 107,219
  • 39
  • 255
  • 462
SamDom
  • 129
  • 2
  • 11

2 Answers2

4

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.

Pippin
  • 4,896
  • 6
  • 34
  • 47
3

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

Shreyas MM
  • 31
  • 1