Skip to main content
wp-config.org

Server configuration

Redis object cache config for WordPress

Plan the memory, connections and access of a Redis object cache for WordPress, with matching WordPress settings and Ubuntu commands.

  • Memory and eviction
  • Socket or TCP
  • Matching wp-config.php

Free, no sign-up. It runs in your browser, so nothing you type is sent to this site.

Nothing you enter leaves your browser.

This tool runs in your browser and needs JavaScript. Turn JavaScript on and reload the page.

Redis

What you can do

  • Redis memory and eviction planning

  • Unix socket and TCP connection options

  • Access control lists and optional TLS

  • Persistence choices and other settings

  • Matching WordPress object cache settings

How to set up a Redis object cache for WordPress

  1. Describe your server

    Select the Ubuntu version, package source and memory profile, leaving room for the other services on the server.

  2. Choose the settings

    Choose the connection method, authentication, memory limit, eviction policy and persistence.

  3. Install and connect

    Install the packages, check the generated files and set up a compatible WordPress object cache plugin before you test the connection.

Keep the cache and WordPress settings in step

This free Redis config generator targets WordPress object caching on Ubuntu 24.04 LTS and 26.04 LTS. It writes the server settings next to the matching WordPress connection values, so the socket or host, the login details and the cache prefix can be checked together. Memory and eviction choices stay editable for your real workload.

Know the limits

A Redis server on its own does not turn on WordPress object caching: you also need a compatible object cache plugin or drop-in. An object cache is not a full page cache. Never expose Redis to the internet without authentication, and do not use cache eviction settings for data that must never be lost. Files that hold passwords or access list secrets must stay private.

Add the connection settings with the wp-config.php generator, size the database with the MariaDB config generator, and include the PHP extension for Redis in your PHP plan.

Frequently asked questions

Do I need a plugin for Redis object caching?

Yes. WordPress needs an object-cache.php drop-in, usually added by a Redis object cache plugin. The wp-config.php settings tell that drop-in how to connect.

Which eviction policy should a WordPress cache use?

If Redis only holds cache data, an allkeys policy such as allkeys-lfu lets Redis remove old keys when memory is full, instead of refusing writes. The generator explains each choice.

Unix socket or TCP?

Use a Unix socket when Redis and PHP are on the same server: it is simple and needs no open port. Use TCP, with a password or ACL user and ideally TLS, when Redis is on another server.

Should Redis save the cache to disk?

For a pure cache, saving to disk is usually turned off, because WordPress rebuilds the cache from the database.

Related tools

  • wp-config.php

    Generate a wp-config.php with database settings, new salt keys and explained options.

  • MariaDB

    Plan MariaDB memory, connections and durability for WordPress.

  • PHP extensions

    Plan PHP extensions, PHP-FPM and OPcache settings for WordPress.

Host WordPress on StackMattic

StackMattic sponsors these free tools. If you would rather not set up and look after the server yourself, StackMattic runs managed WordPress and server hosting.