diff --git a/static/redis-server-ubuntu.sh b/static/redis-server-ubuntu.sh index d84c5eb..0839b13 100644 --- a/static/redis-server-ubuntu.sh +++ b/static/redis-server-ubuntu.sh @@ -48,12 +48,11 @@ else fi install_if_not redis-server -# Set globally doesn't work for some reason -# touch /etc/php/7.0/mods-available/redis.ini -# print_text_in_color "$ICyan" 'extension=redis.so' > /etc/php/7.0/mods-available/redis.ini -# phpenmod redis -# Setting direct to apache2 works if 'libapache2-mod-php7.0' is installed +# FPM is needed for frontend echo 'extension=redis.so' >> /etc/php/"$PHPVER"/fpm/php.ini +# CLI is needed for backend +echo 'extension=redis.so' >> /etc/php/"$PHPVER"/cli/php.ini +service php"$PHPVER"-fpm restart service nginx restart # Install Redis diff --git a/wordpress_install.sh b/wordpress_install.sh index b05f3f1..a2b8cca 100644 --- a/wordpress_install.sh +++ b/wordpress_install.sh @@ -204,7 +204,7 @@ sed -i "s|post_max_size =.*|post_max_size = 110M|g" /etc/php/"$PHPVER"/fpm/php.i sed -i "s|cgi.fix_pathinfo =.*|cgi.fix_pathinfo=0|g" /etc/php/"$PHPVER"/fpm/php.ini sed -i "s|date.timezone =.*|date.timezone = Europe/Stockholm|g" /etc/php/"$PHPVER"/fpm/php.ini -# Make sure the passwords are the same, this file will be deleted when Redis is run. +# Make sure the passwords are the same, this file will be deleted when redis is run. check_command echo "$REDIS_PASS" > $REDISPTXT # Install Redis @@ -311,8 +311,10 @@ define( 'WP_REDIS_CLIENT', 'pecl' ); define( 'WP_REDIS_SCHEME', 'unix' ); /** REDIS PATH TO SOCKET */ define( 'WP_REDIS_PATH', '$REDIS_SOCK' ); -/** REDIS SALT */ +/** REDIS TTL */ define('WP_REDIS_MAXTTL', 9600); +/** REDIS SALT */ +define('WP_REDIS_PREFIX', change_this_redis_salt_to_your_domain_name); /** AUTO UPDATE */ define( 'WP_AUTO_UPDATE_CORE', true );