Giter Site home page Giter Site logo

Comments (5)

DjordjeVucinac82 avatar DjordjeVucinac82 commented on June 28, 2024

redis:
restart: always
image: redis:latest
volumes:
- ./sites/wp1/redis:/data

from 444noresponse.

DjordjeVucinac82 avatar DjordjeVucinac82 commented on June 28, 2024

wp-fpm:
tty: true
stdin_open: true
image: emcniece/wordpress:latest
volumes:
- wproot:/var/www/html
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WPFPM_WP_REDIS_HOST: redis
WPFPM_RT_WP_NGINX_HELPER_CACHE_PATH: "/tmp/cache"
#WP_PLUGINS: "nginx-helper redis-cache"
#ENABLE_HYPERDB: "true"
#ENABLE_CRON: "true"
#CRON_CMD: "*/1 * * * * /usr/bin/curl -silent -A 'Mozilla' 'https://google.com' > /dev/null 2>&1"

mysql:
image: mariadb
command: mysqld --innodb-buffer-pool-size=20M
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: wordpress
MYSQL_DATABASE: wordpress
MYSQL_PASSWORD: wordpress

redis:
image: redis:3-alpine

from 444noresponse.

DjordjeVucinac82 avatar DjordjeVucinac82 commented on June 28, 2024

redis:
image: redis:6
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
ports:
- "6379:6379"
networks:
- backend
# launch Redis in cache mode with :
# - max memory up to 50% of your RAM if needed (--maxmemory 512mb)
# - deleting oldest data when max memory is reached (--maxmemory-policy allkeys-lru)
entrypoint: redis-server --maxmemory 512mb -maxmemory-policy allkeys-lru

from 444noresponse.

DjordjeVucinac82 avatar DjordjeVucinac82 commented on June 28, 2024

define( 'WP_REDIS_HOST', 'redis-cluster' );
define( 'WP_CACHE', true );
// define( 'WP_REDIS_CLIENT', 'pecl' );
define( 'WP_REDIS_PASSWORD', 'SOMEPASSWORD' );
define( 'WP_REDIS_DATABASE', '0' );
define( 'WP_CACHE_KEY_SALT', 'SOMESALTHERE' );
define( 'WP_REDIS_SELECTIVE_FLUSH', true );
define( 'WP_REDIS_DISABLE_BANNERS', true );

from 444noresponse.

DjordjeVucinac82 avatar DjordjeVucinac82 commented on June 28, 2024

Add the following in the db-config.php file in the ini directory of the w3-total-cache plugin directory

//
// redis config cache
//
define( 'W3TC_CONFIG_CACHE_ENGINE', 'redis');
define( 'W3TC_CONFIG_CACHE_REDIS_SERVERS', 'redis_hostname::6379' );

// optional redis settings
define( 'W3TC_CONFIG_CACHE_REDIS_PERSISTENT', true );
define( 'W3TC_CONFIG_CACHE_REDIS_DBID', 0 );
define( 'W3TC_CONFIG_CACHE_REDIS_PASSWORD', '' );

Enable the following in the Performance menu in the WP Admin

General > Page Cache > Redis -- This provides the most bang for the buck
General > Database Cache > Redis
General > Object Cache > Redis

from 444noresponse.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.