Last active
October 25, 2024 23:23
-
-
Save tillkruss/c761c570193a704e389f77b47ffe0273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ./wordpress | |
wget https://objectcache.pro/plugin/redis-cache-pro.zip?token=0000000000 | unzip | |
cp redis-cache-pro/stubs/mu-plugin.php wp-content/mu-plugins/redis-cache-pro.php | |
mv redis-cache-pro wp-content/mu-plugins | |
rm redis-cache-pro.zip | |
read -r -d '' WP_REDIS_CONFIG <<- EOM | |
[ | |
'token' => getenv('OBJECTCACHEPRO_TOKEN'), | |
'host' => getenv('WP_REDIS_HOST'), | |
'port' => 6379, | |
'database' => 0, // change for each site | |
'timeout' => 2.5, | |
'read_timeout' => 2.5, | |
'split_alloptions' => true, | |
'async_flush' => true, | |
'client' => 'relay', // STRESS TEST | |
'compression' => 'zstd', // STRESS TEST | |
'serializer' => 'igbinary', // STRESS TEST | |
'prefetch' => true, // STRESS TEST | |
'debug' => false, | |
'save_commands' => false, | |
] | |
EOM | |
wp config set --add --raw WP_REDIS_CONFIG "${WP_REDIS_CONFIG}" | |
wp config set --add --raw WP_REDIS_DISABLED 'getenv('WP_REDIS_DISABLED') ?: false' | |
wp redis enable --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment