Skip to content

Instantly share code, notes, and snippets.

@mklooss

mklooss/magento2-redis.sh

Last active Feb 17, 2021
Embed
What would you like to do?
magento2-redis.sh
bin/magento setup:config:set \
--cache-backend=redis \
--cache-backend-redis-server=127.0.0.1 \
--cache-backend-redis-port=6379 \
--cache-backend-redis-db=1
bin/magento setup:config:set --page-cache=redis \
--page-cache-redis-server=127.0.0.1 \
--page-cache-redis-port=6379 \
--page-cache-redis-db=2
bin/magento setup:config:set \
--session-save=redis \
--session-save-redis-host=127.0.0.1 \
--session-save-redis-port=6379 \
--session-save-redis-db=6 \
--session-save-redis-compression-lib=lz4 \
--session-save-redis-min-lifetime=3600
# Varnish 6
bin/magento config:set --scope=default --scope-code=0 system/full_page_cache/caching_application 2
bin/magento setup:config:set --http-cache-hosts=127.0.0.1:6081
bin/magento varnish:vcl:generate --export-version=6
# may you have to change the /pub/health_status.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment