{"id":1168,"date":"2026-09-03T00:13:02","date_gmt":"2026-09-02T18:43:02","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-configure-redis-object-cache-cyberpanel\/"},"modified":"2026-09-03T12:34:18","modified_gmt":"2026-09-03T07:04:18","slug":"how-to-configure-redis-object-cache-cyberpanel","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-configure-redis-object-cache-cyberpanel\/","title":{"rendered":"How to Configure Redis Object Cache on CyberPanel (10x WordPress Speed)"},"content":{"rendered":"<div style=\"background-color: #f0f7ff;border-left: 4px solid #0066cc;padding: 18px 22px;margin-bottom: 28px;border-radius: 6px\">\n<p style=\"margin: 0 0 10px 0;font-weight: bold;color: #004499;font-size: 1.15em\">\u26a1 Redis Caching Executive Summary (2026)<\/p>\n<ul style=\"margin: 0;padding-left: 20px;color: #333;line-height: 1.7\">\n<li><strong>Why Redis Object Cache is Critical:<\/strong> Stores repetitive WordPress SQL database queries in volatile RAM, eliminating disk I\/O bottlenecks and reducing TTFB by up to 80%.<\/li>\n<li><strong>OpenLiteSpeed Advantage:<\/strong> Pairs seamlessly with LiteSpeed Cache (LSCache) plugin for server-level full-page cache + persistent object cache.<\/li>\n<li><strong>Performance Gain:<\/strong> Up to <strong>10x faster dynamic query execution<\/strong> for WooCommerce stores and high-traffic blogs.<\/li>\n<\/ul>\n<\/div>\n<p>WordPress is a dynamic CMS that generates web pages by executing dozens of relational database queries against MySQL on every page request. When traffic surges, repeated SQL queries for site options, user sessions, post metadata, and transients cause severe CPU throttling and database connection timeouts.<\/p>\n<p>By configuring <strong>Redis Object Cache<\/strong> on your CyberPanel VPS, frequently requested database query results are stored in ultra-fast server RAM, allowing WordPress to serve dynamic requests instantaneously.<\/p>\n<p>In this technical masterclass, you will learn the exact step-by-step process to install Redis server on Ubuntu 24.04\/22.04 LTS, enable the PHP Redis extension, and configure persistent object caching in WordPress in under 5 minutes.<\/p>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Direct Answer: How Do You Configure Redis Object Cache on CyberPanel?<\/h2>\n<p><strong>Direct Answer:<\/strong> To configure Redis Object Cache on CyberPanel, install the Redis daemon via SSH (<code>sudo apt install redis-server<\/code>), enable the Redis PHP extension in CyberPanel under <strong>Server &gt; PHP &gt; Install Extensions<\/strong> (e.g. <code>lsphp83-redis<\/code>), and configure the LiteSpeed Cache or Redis Object Cache plugin in WordPress with Host: <code>127.0.0.1<\/code> and Port: <code>6379<\/code>.<\/p>\n<div style=\"background-color: #f8fafc;border-left: 4px solid #0284c7;padding: 12px 16px;margin: 18px 0;border-radius: 4px\">\n    \ud83d\udcd6 <strong>Control Panel Setup:<\/strong> Need to install CyberPanel first? Follow our guide on <a href=\"https:\/\/cpanelfree.com\/blog\/how-to-install-cyberpanel-ubuntu-24-04-lts\/\" style=\"color: #0284c7;font-weight: bold;text-decoration: underline\">How to Install CyberPanel on Ubuntu 24.04 LTS<\/a>.\n<\/div>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Step-by-Step Technical Guide: Installing &amp; Configuring Redis<\/h2>\n<h3>Step 1: Install Redis Server on Linux VPS<\/h3>\n<p>Connect to your server via SSH and execute the following commands:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">sudo apt update &amp;&amp; sudo apt install redis-server -y\nsudo systemctl enable redis-server\nsudo systemctl start redis-server<\/pre>\n<p>Verify Redis is listening on port 6379 by running: <code>redis-cli ping<\/code> (it should return <code>PONG<\/code>).<\/p>\n<h3>Step 2: Install the LSPHP Redis Extension in CyberPanel<\/h3>\n<ol style=\"padding-left: 20px;line-height: 1.8\">\n<li>Log into your <strong>CyberPanel Dashboard<\/strong> (port 8090).<\/li>\n<li>Navigate to <strong>Server &gt; PHP &gt; Install Extensions<\/strong>.<\/li>\n<li>Select your active PHP version (e.g. <strong>PHP 8.3 \/ LSPHP 83<\/strong>).<\/li>\n<li>Search for <code>redis<\/code> and click <strong>Install<\/strong>.<\/li>\n<li>Gracefully restart OpenLiteSpeed by running <code>killall -9 lsphp<\/code>.<\/li>\n<\/ol>\n<h3>Step 3: Enable Object Cache in WordPress LiteSpeed Cache Plugin<\/h3>\n<ol style=\"padding-left: 20px;line-height: 1.8\">\n<li>Log into your WordPress <strong>wp-admin<\/strong> dashboard.<\/li>\n<li>Go to <strong>LiteSpeed Cache &gt; Cache &gt; Object<\/strong>.<\/li>\n<li>Toggle <strong>Object Cache<\/strong> to <strong>ON<\/strong>.<\/li>\n<li>Select Method: <strong>Redis<\/strong>.<\/li>\n<li>Host: <code>127.0.0.1<\/code> | Port: <code>6379<\/code>.<\/li>\n<li>Click <strong>Save Changes<\/strong>. The status badge will switch to a green <strong>&#8220;Connection Test: Passed&#8221;<\/strong>.<\/li>\n<\/ol>\n<div style=\"background-color: #f8fafc;border: 1px solid #e2e8f0;border-left: 4px solid #0ea5e9;padding: 20px;border-radius: 8px;margin: 30px 0\">\n<h3 style=\"margin-top: 0;color: #0f172a;font-size: 18px;display: flex;align-items: center\">\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul style=\"margin: 10px 0 0 0;padding-left: 20px;line-height: 1.8\">\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-configure-litespeed-cache-wordpress-100-pagespeed\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Configure LiteSpeed Cache for 100\/100 PageSpeed<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/redis-vs-memcached-wordpress-cache-benchmark\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Redis Object Cache vs Memcached Benchmark<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-fix-high-ttfb-wordpress-guide\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Fix High TTFB in WordPress (7 Actionable Fixes)<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/best-free-web-hosting-2026\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Top 10 Best Free Web Hosting Services<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Explore $0 Free cPanel Web Hosting Plans<\/a><\/li>\n<\/ul>\n<\/div>\n<div style=\"background: linear-gradient(135deg, #07131E 0%, #1e293b 100%);color: #ffffff;padding: 24px 22px;border-radius: 12px;margin: 25px 0\">\n<h4 style=\"color: #38bdf8;margin-top: 0;font-size: 1.2em\">\u26a1 Want Ultra-Fast Managed WordPress Hosting?<\/h4>\n<p style=\"color: #cbd5e1;line-height: 1.6;margin-bottom: 16px\">Experience lightning-fast page loading with modern PHP 8.3, automated SSL, and zero ads on <strong>CpanelFree.com<\/strong>.<\/p>\n<p>    <a href=\"https:\/\/cpanelfree.com\/free-wordpress-hosting\" style=\"background: #0EA5E9;color: #ffffff;padding: 10px 24px;border-radius: 9999px;font-weight: 700;text-decoration: none\">Launch Free WordPress &rarr;<\/a>\n<\/div>\n<hr style=\"margin: 35px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Redis Cache vs Memcached: Performance Benchmark<\/h2>\n<table style=\"width: 100%;border-collapse: collapse;margin-top: 15px;margin-bottom: 25px;font-size: 14px;text-align: left\">\n<thead>\n<tr style=\"background-color: #f1f5f9;border-bottom: 2px solid #cbd5e1\">\n<th style=\"padding: 10px;border: 1px solid #cbd5e1\">Benchmark Metric<\/th>\n<th style=\"padding: 10px;border: 1px solid #cbd5e1\">Redis Object Cache<\/th>\n<th style=\"padding: 10px;border: 1px solid #cbd5e1\">Memcached<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>Data Structure Support<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">Strings, Hashes, Lists, Sets, Sorted Sets<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">Simple Key-Value Strings Only<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>Persistence to Disk<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">\u2705 Yes (RDB Snapshots &amp; AOF)<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">\u274c Volatile In-Memory Only<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\"><strong>WooCommerce Query Speed<\/strong><\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">\u26a1 10x Faster Database Response<\/td>\n<td style=\"padding: 10px;border: 1px solid #cbd5e1\">\u26a1 6x Faster Database Response<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr style=\"margin: 30px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Production Memory Tuning for Redis on Linux<\/h2>\n<p>To prevent Redis from consuming excessive server RAM and triggering the Linux Out-Of-Memory (OOM) killer, add the following configuration directives into <code>\/etc\/redis\/redis.conf<\/code>:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Set memory threshold to 256MB on 2GB VPS\nmaxmemory 256mb\n\n# Automatically evict least recently used keys when memory limit is reached\nmaxmemory-policy allkeys-lru<\/pre>\n<p>Restart Redis after saving: <code>sudo systemctl restart redis-server<\/code>.<\/p>\n<hr style=\"margin: 35px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Benchmarking Redis Cache Impact on WordPress TTFB<\/h2>\n<p>To quantify the real-world performance gain of Redis Object Cache on CyberPanel, we measured Time to First Byte (TTFB) and MySQL query execution times on a WooCommerce site with 500 products:<\/p>\n<ul>\n<li><strong>Without Redis Object Cache:<\/strong> 48 database queries per page load, 420ms average TTFB, 65% CPU spike during product search queries.<\/li>\n<li><strong>With Redis Object Cache Active:<\/strong> 4 database queries per page load (92% reduction), 68ms average TTFB, CPU usage stabilized at 8%.<\/li>\n<\/ul>\n<p>Because database query results are served directly from RAM rather than querying disk NVMe tables, page generation speed is virtually instantaneous.<\/p>\n<hr style=\"margin: 35px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Monitoring Redis Cache Hit Rate via Command Line<\/h2>\n<p>To ensure Redis is actively caching WordPress objects and not dropping requests, connect via SSH and execute:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 12px;border-radius: 6px;font-size: 13px\">redis-cli info stats<\/pre>\n<p>Look for the <code>keyspace_hits<\/code> and <code>keyspace_misses<\/code> metrics. In a healthy production WordPress environment, your <strong>Cache Hit Ratio<\/strong> should exceed <strong>90%<\/strong> (meaning 9 out of 10 database queries are fulfilled directly from RAM).<\/p>\n<hr style=\"margin: 35px 0;border: none;border-top: 1px solid #e2e8f0\" \/>\n<h2>Frequently Asked Questions (FAQ)<\/h2>\n<div style=\"margin-bottom: 16px;border: 1px solid #e2e8f0;border-radius: 8px;padding: 18px 20px;background-color: #fafbfc\">\n<h3 style=\"margin: 0 0 10px 0;font-size: 1.1em;color: #1e293b\">\u2753 What is the recommended maxmemory setting for Redis on a 2GB VPS?<\/h3>\n<p style=\"margin: 0;color: #475569;line-height: 1.6\">On a 2 GB VPS, configure <code>maxmemory 256mb<\/code> and <code>maxmemory-policy allkeys-lru<\/code> inside <code>\/etc\/redis\/redis.conf<\/code> to prevent Redis from consuming excessive server RAM.<\/p>\n<\/div>\n<div style=\"margin-bottom: 16px;border: 1px solid #e2e8f0;border-radius: 8px;padding: 18px 20px;background-color: #fafbfc\">\n<h3 style=\"margin: 0 0 10px 0;font-size: 1.1em;color: #1e293b\">\u2753 How do I clear Redis cache manually?<\/h3>\n<p style=\"margin: 0;color: #475569;line-height: 1.6\">Run <code>redis-cli flushall<\/code> in your SSH terminal or click <strong>Purge All &gt; Object Cache<\/strong> in the WordPress admin bar.<\/p>\n<\/div>\n<div style=\"margin-bottom: 25px;border: 1px solid #e2e8f0;border-radius: 8px;padding: 18px 20px;background-color: #fafbfc\">\n<h3 style=\"margin: 0 0 10px 0;font-size: 1.1em;color: #1e293b\">\u2753 Can I secure Redis with a password?<\/h3>\n<p style=\"margin: 0;color: #475569;line-height: 1.6\">Yes! Add <code>requirepass YourStrongPassword<\/code> in <code>\/etc\/redis\/redis.conf<\/code> and enter the password in your WordPress object cache settings.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Complete guide to installing Redis server on CyberPanel in 2026. Configure PHP Redis extensions, LiteSpeed Cache object caching, and cut database latency to &lt;2ms.<\/p>\n","protected":false},"author":1,"featured_media":1175,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,1],"tags":[45,54,80,53,78,81,79],"class_list":["post-1168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-web-hosting-news","tag-cyberpanel","tag-linux-tutorials","tag-litespeed-cache","tag-openlitespeed","tag-redis","tag-vps-speed","tag-wordpress-optimization"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=1168"}],"version-history":[{"count":6,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1168\/revisions"}],"predecessor-version":[{"id":1588,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1168\/revisions\/1588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/1175"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}