Wordpress w3 total cache and load balancing concerns Wordpress w3 total cache and load balancing concerns wordpress wordpress

Wordpress w3 total cache and load balancing concerns


You can move the entire wp-content folder to a shared directory on a file server. Ensure that the directory permissions allow IIS modify rights just like your current wp-content folder. Then create a virtual directory within your IIS website and point it to the shared path.

This way both web servers can share the same uploads, plugins etc. and you don't have to worry about trying to mirror both web servers. Make the following entry in the wp-config.php on each web server:

define('WP_CONTENT_DIR','//server/sharedpath'.'/wp-content');define('WP_CONTENT_URL', 'https://url-to-virtual-directory/wp-content');

Do this before the entry in wp-config.php:

require_once(ABSPATH.’wp-settings.php’);