• Resolved pefman

    (@pefman)


    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

    (@pefman)

    nobody?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @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

    (@pefman)

    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

    (@vmarko)

    Hello @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.