Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store Redis connection creds in the sites wp-config.php not in the master.php file #337

Closed
lukecav opened this issue Feb 9, 2021 · 4 comments

Comments

@lukecav
Copy link

lukecav commented Feb 9, 2021

Currently, Redis connection creds will be stored in the master.php file inside of /html/wp-content/w3tc-config folder.

If Redis connection creds are being defined in the db-config.php file will Redis connection creds still be written into the master.php file or is that set by default?
https://github.com/W3EDGE/w3-total-cache/wiki/FAQ:-Installation:-Redis-Server

Would it be possible to support setting Redis connection creds in the site wp-config.php to have W3 Total Cache pull from there?

@mavas84
Copy link
Contributor

mavas84 commented Feb 10, 2021

Hello @lukecav

Thank you for your inquiry and I am happy to assist you with this.
You can do this by adding it to wp-config.php for example:

define( 'W3TC_CONFIG_CACHE_ENGINE', 'redis');
define( 'W3TC_CONFIG_CACHE_REDIS_SERVERS', 'localhost:6379' );
define( 'W3TC_CONFIG_CACHE_REDIS_PERSISTENT', true );
define( 'W3TC_CONFIG_CACHE_REDIS_DBID', 0 );
define( 'W3TC_CONFIG_CACHE_REDIS_PASSWORD', '' );

Thanks!

@mavas84 mavas84 closed this as completed Feb 10, 2021
@lukecav
Copy link
Author

lukecav commented Feb 10, 2021

If the Redis connection creds are stored in the sites wp-config.php file would they still be written into the master.php file?

@mavas84
Copy link
Contributor

mavas84 commented Feb 11, 2021

Hello @lukecav

master.php file is updated with settings saved in the admin pages, such as wp-admin/admin.php?page=w3tc_pgcache#advanced
5:50
when storing in wp-config it's the same as storing in a database. It will not be stored in master.php

@lukecav
Copy link
Author

lukecav commented Feb 11, 2021

@mavas84

Thanks for the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants