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

Set config values via UI #173

Open
tillkruss opened this issue May 30, 2020 · 6 comments
Open

Set config values via UI #173

tillkruss opened this issue May 30, 2020 · 6 comments

Comments

@tillkruss
Copy link
Member

After #140 is implemented, maybe we can build a wp-config.php setter that allows users to easily configure the plugin.

@tillkruss tillkruss changed the title Set config values via UI. Set config values via UI May 30, 2020
@naxvog
Copy link
Collaborator

naxvog commented May 30, 2020

Rather than editing the wp-config.php itself I would suggest building a config file for the plugin to be included every time configuration constants are not set to allow for backwards compatibility.

The configuration would be written to an own directory (let's say /wp-content/redis-cache-config) using a sample-config file. I have implemented such functionality for my WPR-Redis Plugin (shameless plug):

The WP-Rocket plugin uses such functionality to save its configuration too. This method assures that wp-config.php is not polluted by constants that the normal user is not recognizing and circumvents any write errors to the WordPress configuration that would most certainly result in a WSOD.

@tillkruss
Copy link
Member Author

Aha, so load the custom config file as part of object-cache.php with defaults?

@naxvog
Copy link
Collaborator

naxvog commented May 30, 2020

We should check if configuration constants were set before for example in an APF file or as part of the wp-config.php and only load defaults if those were not found. But yes the config should be required in the object-cache.php file.

@tillkruss tillkruss added this to the v2.0 milestone May 30, 2020
@tillkruss
Copy link
Member Author

Basics

  • Client
  • Host
  • Port
  • Password
  • Database
  • Prefix/Salt

Nice to have

  • MaxTTL
  • Timeout + Read Timeout
  • Selective flushing
  • Ignored groups
  • Serializer
  • igbinary

@tillkruss tillkruss removed this from the v2.0 milestone Jun 30, 2020
@tullibo
Copy link

tullibo commented Oct 1, 2020

+1 for this dude, we're using on shared environments in Cloudways and Plesk and the cache is hopping between sites. Would be nice if the cache salt was taken care of automatically or in the gui

@brunobertechini
Copy link

brunobertechini commented Nov 23, 2021

Don't forget the default for TLS as well (in my case we have a default redis pointing to Azure Cache with SSL always on)
I am just saying to read that if it is defined in wp-config.php as well
WP_REDIS_SCHEME='tls'

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

No branches or pull requests

4 participants