File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 4848fi
4949install_if_not redis-server
5050
51- # Set globally doesn't work for some reason
52- # touch /etc/php/7.0/mods-available/redis.ini
53- # print_text_in_color "$ICyan" 'extension=redis.so' > /etc/php/7.0/mods-available/redis.ini
54- # phpenmod redis
55- # Setting direct to apache2 works if 'libapache2-mod-php7.0' is installed
51+ # FPM is needed for frontend
5652echo ' extension=redis.so' >> /etc/php/" $PHPVER " /fpm/php.ini
53+ # CLI is needed for backend
54+ echo ' extension=redis.so' >> /etc/php/" $PHPVER " /cli/php.ini
55+ service php" $PHPVER " -fpm restart
5756service nginx restart
5857
5958# Install Redis
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ sed -i "s|post_max_size =.*|post_max_size = 110M|g" /etc/php/"$PHPVER"/fpm/php.i
204204sed -i " s|cgi.fix_pathinfo =.*|cgi.fix_pathinfo=0|g" /etc/php/" $PHPVER " /fpm/php.ini
205205sed -i " s|date.timezone =.*|date.timezone = Europe/Stockholm|g" /etc/php/" $PHPVER " /fpm/php.ini
206206
207- # Make sure the passwords are the same, this file will be deleted when Redis is run.
207+ # Make sure the passwords are the same, this file will be deleted when redis is run.
208208check_command echo " $REDIS_PASS " > $REDISPTXT
209209
210210# Install Redis
@@ -311,8 +311,10 @@ define( 'WP_REDIS_CLIENT', 'pecl' );
311311define( 'WP_REDIS_SCHEME', 'unix' );
312312/** REDIS PATH TO SOCKET */
313313define( 'WP_REDIS_PATH', '$REDIS_SOCK ' );
314- /** REDIS SALT */
314+ /** REDIS TTL */
315315define('WP_REDIS_MAXTTL', 9600);
316+ /** REDIS SALT */
317+ define('WP_REDIS_PREFIX', change_this_redis_salt_to_your_domain_name);
316318
317319/** AUTO UPDATE */
318320define( 'WP_AUTO_UPDATE_CORE', true );
You can’t perform that action at this time.
0 commit comments