📰
Create Redis instance for WordPress
Here's a step-by-step copy-paste tutorial:
bash
# Create a new Redis instance for benchmark.test named "wp-test" listening on /tmp/redis.sockcpcmd -d benchmark.test redis:create wp-test '[unixsocket:/tmp/redis.sock]'# Switch to benchmark.test account to configure pluginsu benchmark.testcd /var/www/html# Install Redis object cache pluginwp-cli plugin install --activate redis-cache# Define Redis pathwp-cli config set WP_REDIS_PATH /tmp/redis.sock# Enable Redis pluginwp-cli redis enable# Verify it is runningwp-cli redis status
Should you need to delete an existing Redis instance, you can go with:
bash
cpcmd -d benchmark.test redis:delete wp-test
Optionally have some fun:
bash
# Define key for sitewp-cli config set WP_CACHE_KEY_SALT benchmarktest# Enable igbinary serializerwp-cli config set WP_REDIS_IGBINARY true --raw# Disable plugin bannerswp-cli config set WP_REDIS_DISABLE_BANNERS true --raw
Looking for installing igbinary
PECL module? Learn how here ↗