How to Optimize WordPress with Redis and Docker - Plesk GuideHow to Optimize WordPress with Redis and Docker - Plesk Guide
Redis can speed up your WordPress site. Here's a quick, simple guide for how you can optimize your WordPress with Redis, Docker and WordPress Toolkit.




Skip to content Contact us: +34 944 58 06 58 Plesk Partner Program Plesk Lifecycle Policy Blog Contact us Plesk 360 Menu Contact us: +34 944 58 06 58 Plesk Partner Program Plesk Lifecycle Policy Blog Contact us Plesk 360 Solutions By Role Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers Menu Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers By Edition Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration Plesk WordPress Edition Menu Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration Plesk WordPress Edition By Cloud Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Menu Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Partner Program Exclusive discounts, benefits and exposure to take your business to the next level Become a partner Product Explore Features Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Menu Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Key Topics WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Menu WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Feature Packs Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Menu Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Featured Extension SEO Toolkit Pricing Extensions Help Center More Careers Events Plesk University FREE TRIAL Solutions By Role Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers By Edition Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration WordPress Edition By Cloud Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Partner Program Partner Program Product Explore Features Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Key Topics WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Feature Packs Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Featured Extension Extension Pricing Extensions Help center More Careers Events Webinars Plesk University Blog Plesk Partner Program Contact Us FREE TRIAL Menu Solutions By Role Developers Content Managers Digital Agencies IT Admins Web Hosters Hyperscalers By Edition Web Admin Edition Web Pro Edition Web Host Edition Business & Collaboration WordPress Edition By Cloud Amazon Web Services Microsoft Azure Alibaba Cloud GCP Marketplace Vultr DigitalOcean Linode Partner Program Partner Program Product Explore Features Everyone Admins & Web Hosters Developers Designers & Agencies Plesk Features Key Topics WordPress Toolkit SEO Toolkit Plesk eCommerce Toolkit Joomla! Toolkit Plesk Premium Email Plesk Email Security Feature Packs Business & Collaboration WordPress Pack Hosting Pack Power Pack Language Pack Featured Extension Extension Pricing Extensions Help center More Careers Events Webinars Plesk University Blog Plesk Partner Program Contact Us FREE TRIAL How to Optimize WordPress with Redis and Docker By Paul Mikhaylov July 30, 2019 Guides, Product and technology 3 Minutes Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports various data structures and offers extensive customizations. In this article, we’re going to discuss how you can use it to optimize a WordPress website. WordPress Cache and Redis WordPress caches internal application objects, like breadcrumbs, menu items, and so on, in the MySQL database. It may be quite taxing since that database also handles queries for page requests. Both combined may increase website load-times. Redis offers a caching mechanism that substitutes MySQL database. When a user visits a WordPress website, the MySQL queries necessary to generate the page come via Redis, which also caches the results. This helps to reduce loading time. How Does WordPress and Redis Work Together? When a user requests a WordPress page for the first time, MySQL queries are performed on the server. Redis caches the result of those queries and stores it. So, when another user requests the same page, Redis provides the information, bypassing the database. If the query is not cached by Redis, MySQL provides the results and then adds them to Redis cache. When a particular value is updated in the database, the corresponding Redis value becomes invalid. Therefore, you avoid serving bad cache data to the user. Running Redis with a Docker Container To simplify the Redis installation, we’re running it in a Docker container. To install one via Plesk, go to Server Management > Docker and search for the imaSkip - to - content - Contact - us: - +34 - 944 - 58 - 06 - 58 - Plesk - Partner - Program - Plesk - Lifecycle - Policy - Blog - Contact - us - Plesk - 360 - Menu - Contact - us: - +34 - 944 - 58 - 06 - 58 - Plesk - Partner - Program - Plesk - Lifecycle - Policy - Blog - Contact - us - Plesk - 360 - Solutions - By - Role - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - Menu - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - By - Edition - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - Plesk - WordPress - Edition - Menu - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - Plesk - WordPress - Edition - By - Cloud - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Menu - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Partner - Program - Exclusive - discounts - - benefits - and - exposure - to - take - your - business - to - the - next - level - Become - a - partner - Product - Explore - Features - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Menu - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Key - Topics - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Menu - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Feature - Packs - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Menu - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Featured - Extension - SEO - Toolkit - Pricing - Extensions - Help - Center - More - Careers - Events - Plesk - University - FREE - TRIAL - Solutions - By - Role - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - By - Edition - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - WordPress - Edition - By - Cloud - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Partner - Program - Partner - Program - Product - Explore - Features - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Key - Topics - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Feature - Packs - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Featured - Extension - Extension - Pricing - Extensions - Help - center - More - Careers - Events - Webinars - Plesk - University - Blog - Plesk - Partner - Program - Contact - Us - FREE - TRIAL - Menu - Solutions - By - Role - Developers - Content - Managers - Digital - Agencies - IT - Admins - Web - Hosters - Hyperscalers - By - Edition - Web - Admin - Edition - Web - Pro - Edition - Web - Host - Edition - Business - & - Collaboration - WordPress - Edition - By - Cloud - Amazon - Web - Services - Microsoft - Azure - Alibaba - Cloud - GCP - Marketplace - Vultr - DigitalOcean - Linode - Partner - Program - Partner - Program - Product - Explore - Features - Everyone - Admins - & - Web - Hosters - Developers - Designers - & - Agencies - Plesk - Features - Key - Topics - WordPress - Toolkit - SEO - Toolkit - Plesk - eCommerce - Toolkit - Joomla! - Toolkit - Plesk - Premium - Email - Plesk - Email - Security - Feature - Packs - Business - & - Collaboration - WordPress - Pack - Hosting - Pack - Power - Pack - Language - Pack - Featured - Extension - Extension - Pricing - Extensions - Help - center - More - Careers - Events - Webinars - Plesk - University - Blog - Plesk - Partner - Program - Contact - Us - FREE - TRIAL - How - to - Optimize - WordPress - with - Redis - and - Docker - By - Paul - Mikhaylov - July - 30 - - 2019 - Guides - - Product - and - technology - 3 - Minutes - Redis - is - an - open - source - (BSD - licensed) - - in-memory - data - structure - store - - used - as - a - database - - cache - and - message - broker. - It - supports - various - data - structures - and - offers - extensive - customizations. - In - this - article - - we’re - going - to - discuss - how - you - can - use - it - to - optimize - a - WordPress - website. - WordPress - Cache - and - Redis - WordPress - caches - internal - application - objects - - like - breadcrumbs - - menu - items - - and - so - on - - in - the - MySQL - database. - It - may - be - quite - taxing - since - that - database - also - handles - queries - for - page - requests. - Both - combined - may - increase - website - load-times. - Redis - offers - a - caching - mechanism - that - substitutes - MySQL - database. - When - a - user - visits - a - WordPress - website - - the - MySQL - queries - necessary - to - generate - the - page - come - via - Redis - - which - also - caches - the - results. - This - helps - to - reduce - loading - time. - How - Does - WordPress - and - Redis - Work - Together? - When - a - user - requests - a - WordPress - page - for - the - first - time - - MySQL - queries - are - performed - on - the - server. - Redis - caches - the - result - of - those - queries - and - stores - it. - So - - when - another - user - requests - the - same - page - - Redis - provides - the - information - - bypassing - the - database. - If - the - query - is - not - cached - by - Redis - - MySQL - provides - the - results - and - then - adds - them - to - Redis - cache. - When - a - particular - value - is - updated - in - the - database - - the - corresponding - Redis - value - becomes - invalid. - Therefore - - you - avoid - serving - bad - cache - data - to - the - user. - Running - Redis - with - a - Docker - Container - To - simplify - the - Redis - installation - - we’re - running - it - in - a - Docker - container. - To - install - one - via - Plesk - - go - to - Server - Management - > - Docker - and - search - for - the - ima -