Serving wp-content and plugins from a different base server location
-
Hi – running multi-site and trying to figure out how to use the following to define a completely different server location for my plugins and other wp-content storage.
I’m trying to use wp-config to do this but can’t seem to make it work. Using the following:
define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/blog/wp-content’ );
define( ‘WP_CONTENT_URL’, ‘https://example/blog/wp-content’);
define( ‘WP_PLUGIN_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/blog/wp-content/plugins’ );
define( ‘WP_PLUGIN_URL’, ‘https://example/blog/wp-content/plugins’);If my main site is being hosted from https://www.domain.com, I want to have the wp-content and plugins served from a different server located at https://content.domain.com.
I’ve tried putting in the server’s DOCUMENT_ROOT for content.domain.com which is quite different than the main site and so far, although WordPress loads – it can’t find the new locations. Since it is a different server in a different location, do I need to somehow also specify the fully qualified domain within the DOCUMENT_ROOT?
I’m doing this because the front-end server is designed to have limited storage – and is attempting to connect with a different server (content.domain.com) that is purpose built to house everything.
Thanks for your help!
- The topic ‘Serving wp-content and plugins from a different base server location’ is closed to new replies.