2025-03-04 10:47:25 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
|
|
echo ${REDIS_HOSTNAME}
|
|
|
|
if [ -f "/redis.ok" ]; then
|
|
|
|
echo "[*] redis-cache already installed and configured"
|
|
|
|
else
|
|
|
|
echo "[*] Installing redis-cache plugin"
|
|
|
|
wp --allow-root config set WP_REDIS_HOST ${REDIS_HOSTNAME}
|
|
|
|
wp --allow-root config set WP_REDIS_PORT ${REDIS_PORT}
|
|
|
|
wp --allow-root config set WP_CACHE_KEY_SALT ${WP_URL}
|
|
|
|
wp --allow-root plugin install redis-cache --activate
|
|
|
|
wp --allow-root plugin update --all
|
|
|
|
wp --allow-root redis enable
|
|
|
|
touch /redis.ok
|
2025-03-05 20:43:51 +01:00
|
|
|
chmod 777 -R /var/www/wordpress
|
2025-03-04 10:47:25 +01:00
|
|
|
fi
|