Title: problem preconfiguring w3
Last modified: June 12, 2020

---

# problem preconfiguring w3

 *  Resolved [pefman](https://wordpress.org/support/users/pefman/)
 * (@pefman)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-preconfiguring-w3/)
 * I have been trying to preinstall this plugin in a docker container and preloading
   some variables on which redis server to use, but i just cannot get it to work.
 * the following lines are
 * define( ‘W3TC_CONFIG_CACHE_ENGINE’, ‘redis’);
    define( ‘W3TC_CONFIG_CACHE_REDIS_SERVERS’,‘
   127.0.0.1:6379’ ); define( ‘W3TC_CONFIG_CACHE_REDIS_PERSISTENT’, true ); define(‘
   W3TC_CONFIG_CACHE_REDIS_DBID’, 0 ); define( ‘W3TC_CONFIG_CACHE_REDIS_PASSWORD’,”);
 * I have used the extra configs in docker, manually edited the wp-config.php, ive
   even tried the db-config.php in the folder /wp-content/plugins/w3-total-cache/
   ini/
 * But nothing seems to change the default values when i activate the plugin…
 * The only place that seems to have some effect is the file wp-content/w3tc-config/
   master.php but it seems like its generated first after the plugin is installed.
 * Could someone please help me, this is driving me nuts!
 * Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [pefman](https://wordpress.org/support/users/pefman/)
 * (@pefman)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-preconfiguring-w3/#post-12984231)
 * nobody?
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-preconfiguring-w3/#post-12986151)
 * Hello [@pefman](https://wordpress.org/support/users/pefman/)
 * Thank you for your inquiry and I am happy to answer this.
    All W3 Total Cache
   settings are being saved to master.php wich as you mentioned is being generated
   one the plugin is installed/activated. As the Redis settings are also saved there
   for a specific caching module, the only thing you can do is to use that file.
   Meaning if you want Redis for Page Cache, this first needs to be configured in
   the plugin itself and then you can use master.php and add it manually before 
   the installation/activation to wp-content/w3tc-config/master.php. Also, make 
   sure to install the redisphp module as W3TC only recognizes PHP modules installed.
   Thanks!
 *  Thread Starter [pefman](https://wordpress.org/support/users/pefman/)
 * (@pefman)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-preconfiguring-w3/#post-12987087)
 * Hi Marko,
 * Thanks for your answer! perhaps i was not clear enough. The problem is not that
   i have to activate the different caching options, the problem is that the default
   redis server is not the one i have defined using the variable
 * such as W3TC_CONFIG_CACHE_REDIS_SERVERS
 * It seems like the cache plugin ignores this once activated.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-preconfiguring-w3/#post-13007871)
 * Hello [@pefman](https://wordpress.org/support/users/pefman/)
 * Sorry for the late reply.
 * W3TC_CONFIG_CACHE_ENGINE is not related to it. If you want to pre config something–
   you should use wp-cli or write w3tc-config/master.php directly (and refresh env
   via wp-cli afterward)
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘problem preconfiguring w3’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [define](https://wordpress.org/support/topic-tag/define/)
 * [docker](https://wordpress.org/support/topic-tag/docker/)
 * [kubernetes](https://wordpress.org/support/topic-tag/kubernetes/)
 * [redis](https://wordpress.org/support/topic-tag/redis/)

 * 4 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/problem-preconfiguring-w3/#post-13007871)
 * Status: resolved