• How do I configure Redis on shared hosting?

    Is there a way to configure Redis directly in wp-config.php?

    I’m testing the plugin, thank you for creating this great plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author adelong01

    (@adelong01)

    Thank you for trying QuantumCache!

    Yes, you can configure Redis via wp-config.php, but there are a couple of important prerequisites.

    1. Make sure Redis is actually available

    On shared hosting, Redis only works if your host provides a Redis service, and
    the PHP redis extension is installed (php-redis)

    If that extension isn’t available, QuantumCache will automatically fall back to MySQL.

    1. Basic wp-config.php setup

    You can define your Redis connection like this:

    define( ‘QUANTUMCACHE_REDIS_HOST’, ‘127.0.0.1’ );
    define( ‘QUANTUMCACHE_REDIS_PORT’, 6379 );
    define( ‘QUANTUMCACHE_REDIS_DB’, 0 );

    (Optional)

    define( ‘QUANTUMCACHE_KEY_PREFIX’, ‘mysite:qc:’ );
    define( ‘WP_CACHE_KEY_SALT’, ‘your-unique-salt’ );

    If these constants are set, they override anything configured in the plugin UI.

    1. Store mode (important)

    QuantumCache still uses the store mode setting:

    auto (default): tries Redis → falls back to MySQL
    redis: forces Redis (will fail if unavailable)
    mysql: disables Redis

    For most shared hosting setups, leave it on auto.

    1. How to verify it’s working Run: wp quantumcache status
      Or check response headers (look for X-QC-Store: redis)

    Short version:

    1. Yes, wp-config.php works for Redis config
    2. Redis must be provided by your host with php-redis enabled
    3. Otherwise, QuantumCache will quietly fall back to MySQL
    Thread Starter Phuong Tong

    (@tvphuong41)

    One more question: I left the settings at default, but when I pressed the “clear all cache” button, the Entries and Tags parameters didn’t return to 0; I didn’t see any changes. Is there a problem?

    I ran the command wp quantumcache status and got the result.

    Error: 'quantumcache' is not a registered wp command. See 'wp help' for available commands.
    Plugin Author adelong01

    (@adelong01)

    Thanks for reporting this.

    There was an issue in the current build where “Clear all cache” wasn’t working correctly. That’s why the Entries/Tags values didn’t change.

    I’ve fixed this and it will be included in the next release (0.1.7), which I expect to publish tomorrow.

    Also, the “wp quantumcache” commands are part of that same upcoming release. They aren’t in the current version.

    I appreciate you taking the time to test it. I’ve updated my automated tests accordingly.

    Plugin Author adelong01

    (@adelong01)

    To further clarify, I made a mistake on my end earlier by suggesting you use “wp quantumcache status“. I was referencing the 1.7 release in my development environment rather than the public release. I still plan to release it tomorrow however.

    Thanks again.

    Thread Starter Phuong Tong

    (@tvphuong41)

    Thank you very much again for writing this plugin. Thanks

    Plugin Author adelong01

    (@adelong01)

    You are very welcome! Thank you for your patience as I work out the bugs.

    I just released version 0.1.7 which should address the issues you reported. If you still have problems let me know, and I’ll do my best to get them resolved.

    Thread Starter Phuong Tong

    (@tvphuong41)

    Everything worked well, thank you very much. I will test it on my site to see how the time will be.

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

You must be logged in to reply to this topic.