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:
- Url rewriting but the original
wp-content
still shows in the source code. - Doing a site download, find and replace and then re-upload but it takes over 24 hours with my server.
- The plugin Real-Time Find and Replace changes the words from
wp-content
toxyz-content
quickly, but the css etc does not load.
Is there another way to do this?
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.
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