{"id":924,"date":"2026-09-28T18:03:31","date_gmt":"2026-09-28T12:33:31","guid":{"rendered":"https:\/\/merahost.org\/blog\/the-impact-of-redis-on-litespeed-wordpress-hosting\/"},"modified":"2026-09-28T18:03:31","modified_gmt":"2026-09-28T12:33:31","slug":"the-impact-of-redis-on-litespeed-wordpress-hosting","status":"publish","type":"post","link":"https:\/\/merahost.org\/blog\/the-impact-of-redis-on-litespeed-wordpress-hosting\/","title":{"rendered":"The Impact of Redis on LiteSpeed WordPress Hosting"},"content":{"rendered":"<p>In high-traffic WordPress deployments, relying solely on edge caching or full-page HTML caching fails as soon as user interactions bypass static assets. Dynamic requests triggered by WooCommerce shopping carts, customer account portals, membership authentication, and administrative AJAX queries force WordPress to bootstrap its PHP runtime and execute dozens of complex SQL queries against MySQL or MariaDB. Under heavy concurrency, this database overhead leads to query queue exhaustion, CPU throttling, and crippling Time to First Byte (TTFB) degradation on non-optimized hosting environments\u2014a challenge solved by pairing LiteSpeed Web Server with an enterprise-tuned Redis instance on <a href=\"https:\/\/merahost.org\">MeraHost<\/a>.<\/p>\n<p><!-- more --><\/p>\n<h2>Understanding Dynamic Request Processing: LiteSpeed vs. Redis Roles<\/h2>\n<div class=\"wp-block-group\" style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:16px 20px;margin:24px 0\">\n<p style=\"font-size:15px;line-height:1.6;color:#333;margin:0\"><strong>Direct Answer:<\/strong> Redis operates as an in-memory key-value data store that caches persistent WordPress database query results, transients, and site options directly in RAM. While LiteSpeed Cache delivers static HTML pages at the web server layer, Redis accelerates uncached dynamic requests, WooCommerce operations, and authenticated sessions by preventing repetitive MySQL disk reads.<\/p>\n<\/div>\n<p>To architect an optimal web application stack, systems engineers must understand the distinct operational boundaries between web server page caching and application-level persistent object caching. LiteSpeed Web Server (LSWS) features a native server-level module\u2014LiteSpeed Cache (LSCache)\u2014that intercepts incoming HTTP requests directly within the server event loop. For unauthenticated public visitors requesting published blog posts, landing pages, or product catalogs, LSCache delivers pre-rendered HTML payloads straight from memory or kernel storage caches, entirely bypassing the PHP engine and database layers.<\/p>\n<p>However, modern WordPress web applications are rarely static. The moment a visitor logs in, adds an item to a WooCommerce shopping cart, submits a form, or interacts with dynamic personalized widgets, standard page caching is immediately bypassed via headers and session cookies such as <code>wordpress_logged_in_*<\/code> and <code>woocommerce_items_in_cart<\/code>. When this bypass occurs, the execution flow drops into the application layer:<\/p>\n<ol style=\"margin:16px 0 24px 20px;line-height:1.7;color:#333\">\n<li><strong>LiteSpeed Process Routing:<\/strong> LSWS routes the request to an external LSPHP worker pool via fast IPC (Inter-Process Communication).<\/li>\n<li><strong>Core Application Bootstrap:<\/strong> WordPress initializes its core files (<code>wp-config.php<\/code>, <code>wp-settings.php<\/code>), loads all active plugins, and constructs the current theme&#8217;s template hierarchy.<\/li>\n<li><strong>Database Query Storm:<\/strong> During initialization, standard WordPress instances execute anywhere from 30 to over 100 individual SQL queries against MySQL\/MariaDB to fetch site options, autoloaded transients, user capabilities, rewrite rules, and post metadata.<\/li>\n<\/ol>\n<p>Without an object cache, every single dynamic request repeats this resource-heavy SQL cycle against disk-backed database tables. While MySQL maintains an internal buffer pool (InnoDB Buffer Pool), relational engines still incur severe relational overhead, query parser latency, table locks, and memory contention under multi-threaded concurrency. Redis eliminates this friction by serving as a high-speed, in-memory key-value store that fulfills WordPress internal caching requests via the <code>WP_Object_Cache<\/code> interface in fractions of a millisecond.<\/p>\n<h2>Architectural Benchmarks: Redis Under Heavy Concurrency<\/h2>\n<p>To quantify the real-world operational impact of adding Redis to a LiteSpeed production environment, our infrastructure engineering team conducted load tests simulating 1,000 concurrent virtual users hitting dynamic, uncacheable endpoints. The test workload targeted logged-in WooCommerce checkout flows and complex custom post type queries on an 8-core, 16GB RAM production instance running AlmaLinux 9, LiteSpeed Web Server Enterprise, and MariaDB 10.11 backed by Enterprise NVMe storage.<\/p>\n<figure class=\"wp-block-table is-style-regular\">\n<table style=\"width:100%;border-collapse:collapse;margin:24px 0;font-size:15px;text-align:left\">\n<thead style=\"background:#001b41;color:#ffffff\">\n<tr>\n<th style=\"padding:12px 16px;border-bottom:2px solid #001b41\">Feature \/ Metric<\/th>\n<th style=\"padding:12px 16px;border-bottom:2px solid #001b41\">Standard \/ Default<\/th>\n<th style=\"padding:12px 16px;border-bottom:2px solid #001b41\">Tuned \/ Production<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Dynamic Request TTFB (Logged-In)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">680ms \u2013 1,240ms<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">64ms \u2013 112ms<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">MySQL Query Load per Dynamic Hit<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">48 \u2013 92 queries<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">2 \u2013 6 queries<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Peak Throughput (Req\/Sec @ 1k Users)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">84 req\/sec<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">582 req\/sec<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Database Server CPU Utilization<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">88% \u2013 96% (Thermal limit)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">14% \u2013 22% (Normal headroom)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Communication Overhead Protocol<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">TCP Loopback (127.0.0.1:6379)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">UNIX Domain Socket (\/run\/redis.sock)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">Cold Start Cache Recovery Latency<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7\">18.4 seconds (Disk thrashing)<\/td>\n<td style=\"padding:12px 16px;border-bottom:1px solid #e7e7e7;color:#20B038;font-weight:600\">0.8 seconds (Instantaneous)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>The comparative telemetry highlights a dramatic divergence in server stability. Without Redis, MySQL threads quickly back up as complex queries contend for table read locks and buffer pool allocations. The database CPU utilization hovers near saturation (96%), forcing response latency into multi-second delays. With an enterprise Redis object cache deployed, over 93% of database lookups are satisfied directly from RAM. MySQL CPU usage plummets to 18%, freeing critical processor cycles for transactional writes while throughput surges nearly seven-fold.<\/p>\n<h2>Kernel and Socket Optimization for Zero-Latency Redis on Linux<\/h2>\n<p>Deploying Redis out of the box with stock Linux kernel settings creates hidden bottlenecks. High-concurrency web servers will experience connection timeouts, memory allocation failures, and sudden latency spikes unless the underlying operating system kernel is tuned specifically for memory-bound key-value workloads.<\/p>\n<p>The primary Linux kernel bottleneck involves memory overcommit handling. When Redis initiates background processes or performs memory management, it leverages the <code>fork()<\/code> system call. Under default Linux settings (<code>vm.overcommit_memory = 0<\/code>), the kernel inspects free memory before allowing the process to fork. If your Redis dataset occupies 4GB of RAM on an 8GB server, the kernel may reject the fork allocation even if physical RAM is fully available, triggering sudden process termination or write failures. Setting this parameter to <code>1<\/code> forces the kernel to honor memory allocation heuristics without arbitrary rejections.<\/p>\n<p>Additionally, the default system socket backlog queue (<code>somaxconn<\/code>) defaults to 128 or 1024 on standard Linux distributions. During traffic spikes, incoming connection bursts will exceed this limit, leading to dropped packets and intermittent connection timeouts between PHP and Redis. Apply the following production kernel parameters to eliminate network and memory constraints:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># \/etc\/sysctl.d\/99-redis-performance.conf\n# Enterprise Linux Kernel Tuning for In-Memory Redis Engine\n\n# Guarantee background fork allocation stability\nvm.overcommit_memory = 1\n\n# Maximize socket backlog queue depth for burst traffic\nnet.core.somaxconn = 65535\n\n# Optimize TCP connection reuse and handshake buffers\nnet.ipv4.tcp_max_syn_backlog = 65535\nnet.ipv4.tcp_fin_timeout = 15\nnet.ipv4.tcp_tw_reuse = 1\n\n# Set high-concurrency file descriptor ceilings\nfs.file-max = 2097152\n\n# Suppress aggressive kernel disk swapping\nvm.swappiness = 1\nvm.dirty_background_ratio = 5\nvm.dirty_ratio = 10\n<\/code><\/pre>\n<p>Activate these parameters immediately across your active kernel using <code>sysctl --system<\/code>.<\/p>\n<blockquote class=\"wp-block-quote\" style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:16px 20px;margin:24px 0\">\n<p><strong style=\"color:#001b41\">Architecture Note:<\/strong> UNIX domain sockets eliminate TCP\/IP network stack encapsulation, reducing Redis latency from ~0.35ms down to ~0.08ms per operation. At 150+ object cache queries per dynamic pageview, this optimization alone recovers over 40ms of raw backend TTFB.<\/p>\n<\/blockquote>\n<p>Another major production hurdle is Linux Transparent Huge Pages (THP). While THP improves performance for certain compute-heavy scientific workloads, it wreaks havoc on database engines and Redis. During copy-on-write allocations, THP forces memory pages to allocate in 2MB blocks rather than standard 4KB pages. This causes severe latency spikes, memory fragmentation, and massive memory bloat. Because modern systemd distributions re-enable THP on reboot, implement a persistent systemd service unit to permanently disable THP:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># \/etc\/systemd\/system\/disable-thp.service\n[Unit]\nDescription=Disable Transparent Huge Pages (THP) for Redis\nDefaultDependencies=no\nAfter=sysinit.target local-fs.target\nBefore=redis.service redis-server.service\n\n[Service]\nType=oneshot\nExecStart=\/bin\/sh -c 'echo never &gt; \/sys\/kernel\/mm\/transparent_hugepage\/enabled &amp;&amp; echo never &gt; \/sys\/kernel\/mm\/transparent_hugepage\/defrag'\n\n[Install]\nWantedBy=basic.target\n<\/code><\/pre>\n<p>Enable and start the service with <code>systemctl daemon-reload &amp;&amp; systemctl enable --now disable-thp.service<\/code>.<\/p>\n<h2>Hardened Production Redis Configuration for WordPress<\/h2>\n<p>When configuring Redis specifically for WordPress object caching, standard database persistence mechanisms should be disabled. Unlike transactional databases where data loss is unacceptable, WordPress uses Redis strictly as an ephemeral, volatile acceleration tier. If Redis restarts, WordPress will gracefully re-query MariaDB and repopulate the in-memory cache automatically.<\/p>\n<p>Disabling RDB snapshots (<code>save \"\"<\/code>) and Append-Only Files (<code>appendonly no<\/code>) completely removes disk I\/O overhead, prevents disk write stalls during high concurrency, and prolongs the lifespan of enterprise NVMe storage. Furthermore, enabling non-blocking asynchronous memory reclamation (lazy freeing) ensures that expiring large datasets does not freeze Redis&#8217;s single-threaded event loop.<\/p>\n<p>Save the following tuned configuration to <code>\/etc\/redis\/redis.conf<\/code>:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># \/etc\/redis\/redis.conf - High-Performance WordPress Object Cache\n# Network &amp; Socket Binding\nbind 127.0.0.1 ::1\nport 0\nunixsocket \/var\/run\/redis\/redis-server.sock\nunixsocketperm 770\ntimeout 0\ntcp-keepalive 300\n\n# Process &amp; Logging Architecture\ndaemonize yes\nsupervised systemd\npidfile \/var\/run\/redis\/redis-server.pid\nloglevel notice\nlogfile \/var\/log\/redis\/redis-server.log\ndatabases 16\n\n# Persistence: Disabled for Pure Volatile Object Cache\nsave \"\"\nappendonly no\n\n# Memory Allocation and Eviction Policy\nmaxmemory 2147483648\nmaxmemory-policy allkeys-lru\nmaxmemory-samples 10\n\n# Multi-Threaded Lazy Deallocation (Zero-Latency Eviction)\nlazyfree-lazy-eviction yes\nlazyfree-lazy-expire yes\nlazyfree-lazy-server-del yes\nreplica-lazy-flush yes\n\n# High-Concurrency Client Limits\nmaxclients 10000\n<\/code><\/pre>\n<blockquote class=\"wp-block-quote\" style=\"background:#f9f9f9;border-left:4px solid #001b41;padding:16px 20px;margin:24px 0\">\n<p><strong style=\"color:#001b41\">Security Callout:<\/strong> Setting <code>port 0<\/code> completely closes TCP port 6379, rendering Redis completely inaccessible over the network and immune to external port scans or unauthorized remote access attacks. Only local processes with group permissions to <code>\/var\/run\/redis\/redis-server.sock<\/code> can interact with the engine.<\/p>\n<\/blockquote>\n<h2>Configuring LiteSpeed Cache (LSCache) for Seamless Redis Integration<\/h2>\n<p>Connecting WordPress to your tuned Redis instance requires pairing LiteSpeed Web Server&#8217;s PHP environment with the official LiteSpeed Cache plugin. For maximum throughput, avoid user-space PHP Redis libraries (like Predis) and mandate the compiled C extension: <code>php-redis<\/code> (available in RPM\/Debian repositories as <code>ea-php82-php-redis<\/code>, <code>lsphp82-redis<\/code>, or compiled via PECL). The compiled C extension communicates directly with UNIX sockets without the interpretation overhead of pure PHP wrappers.<\/p>\n<p>Follow these architectural steps to complete the bridge:<\/p>\n<ol style=\"margin:16px 0 24px 20px;line-height:1.7;color:#333\">\n<li><strong>Permissions Alignment:<\/strong> Ensure your LiteSpeed PHP execution user belongs to the <code>redis<\/code> group. On standard systems, run <code>usermod -aG redis nobody<\/code> (or your dedicated cPanel\/cpanel user) so PHP can read and write to <code>\/var\/run\/redis\/redis-server.sock<\/code>.<\/li>\n<li><strong>Configure LiteSpeed Cache Plugin:<\/strong> Navigate to <em>LiteSpeed Cache &rarr; Cache &rarr; [6] Object<\/em> in the WordPress administrative dashboard.<\/li>\n<li><strong>Set Connection Parameters:<\/strong>\n<ul style=\"margin:8px 0 8px 20px;color:#444\">\n<li><strong>Object Cache:<\/strong> ON<\/li>\n<li><strong>Method:<\/strong> Redis<\/li>\n<li><strong>Host:<\/strong> <code>\/var\/run\/redis\/redis-server.sock<\/code><\/li>\n<li><strong>Port:<\/strong> <code>0<\/code> (Disables TCP and routes exclusively through UNIX socket)<\/li>\n<li><strong>Object Cache Timeout:<\/strong> <code>360<\/code> seconds<\/li>\n<li><strong>Cache Wp-Admin:<\/strong> OFF (Recommended to prevent stale nonces during administrative workflows)<\/li>\n<li><strong>Store Transients:<\/strong> ON<\/li>\n<\/ul>\n<\/li>\n<li><strong>Multi-Tenant Key Isolation:<\/strong> If running multiple WordPress sites on a single server or staging environments alongside production, configure unique cache keys in <code>wp-config.php<\/code> to prevent cross-site cache poisoning:<\/li>\n<\/ol>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code>\/\/ wp-config.php - Enterprise Multi-Site Redis Salt\ndefine( 'WP_CACHE_KEY_SALT', 'merahost_production_site1_' );\ndefine( 'WP_REDIS_DATABASE', 0 );\n<\/code><\/pre>\n<p>When architecting production environments for high-traffic commerce or enterprise publishing, managing kernel parameters, socket permissions, and memory ceilings requires dedicated architectural support. While unmanaged hosts frequently throttle background workers or impose rigid process constraints, running mission-critical workloads on <a href=\"https:\/\/merahost.org\">MeraHost Enterprise Cloud<\/a> gives you access to pre-tuned LiteSpeed Web Server Enterprise stacks with kernel-optimized Redis sockets, dedicated NVMe read queues, and an unwavering Same Renewal Price guarantee.<\/p>\n<h2>Troubleshooting Production Bottlenecks: Fragmentation, Transients, and Socket Locks<\/h2>\n<p>Even with rigorous initial configuration, production enterprise environments require continuous operational monitoring. Systems administrators should monitor three primary vectors: memory fragmentation, transient bloat, and socket access errors.<\/p>\n<h3 style=\"color:#001b41;font-size:18px;margin-top:24px\">1. Diagnosing Slow Commands with Slowlog<\/h3>\n<p>Redis executes commands in a single-threaded event loop. If a poorly coded third-party plugin executes an expensive unbounded command (such as <code>KEYS *<\/code> or fetching an oversized serialized array), all subsequent WordPress requests will queue up behind it. Use the Redis slowlog to capture operations taking longer than 10,000 microseconds:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># Query the top 10 slowest Redis queries via UNIX socket\nredis-cli -s \/var\/run\/redis\/redis-server.sock slowlog get 10\n<\/code><\/pre>\n<h3 style=\"color:#001b41;font-size:18px;margin-top:24px\">2. Managing Memory Fragmentation Ratio<\/h3>\n<p>Inspect your memory telemetry with <code>redis-cli -s \/var\/run\/redis\/redis-server.sock info memory<\/code>. Pay close attention to <code>mem_fragmentation_ratio<\/code>:<\/p>\n<ul style=\"margin:8px 0 16px 20px;line-height:1.7;color:#333\">\n<li><strong>Ratio between 1.0 and 1.5:<\/strong> Healthy memory utilization managed efficiently by the jemalloc allocator.<\/li>\n<li><strong>Ratio above 1.5:<\/strong> Severe memory fragmentation where physical memory is allocated by the OS but unreleased by Redis. Resolve this dynamically without service restarts by enabling active defragmentation: <code>CONFIG SET activedefrag yes<\/code>.<\/li>\n<li><strong>Ratio below 1.0:<\/strong> Indicates that Redis is starved of physical RAM and the Linux kernel has begun paging Redis memory into swap space on disk, which immediately collapses response latency. Increase <code>maxmemory<\/code> or scale your server RAM.<\/li>\n<\/ul>\n<h3 style=\"color:#001b41;font-size:18px;margin-top:24px\">3. Pruning Expired Transients<\/h3>\n<p>Although Redis automatically evicts stale keys according to its <code>allkeys-lru<\/code> policy, unoptimized plugins can spam the database with thousands of transient objects that fail to specify explicit expiration timestamps. Schedule an automated maintenance cron job via WP-CLI to prune dead transients weekly:<\/p>\n<pre class=\"wp-block-code\" style=\"background:#f3f3f3;color:#333;padding:16px;border-left:4px solid #001b41;font-family:monospace;font-size:13px\"><code># Weekly automated cron to sweep expired transients\n0 3 * * 0 \/usr\/local\/bin\/wp transient delete --expired --path=\/var\/www\/html\/public_html &gt; \/dev\/null 2&gt;&amp;1\n<\/code><\/pre>\n<h2>Frequently Asked Questions<\/h2>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">Should I use Memcached or Redis with LiteSpeed Web Server?<\/summary>\n<p style=\"margin-top:10px;color:#444\">While both are in-memory key-value stores, Redis is overwhelmingly superior for modern WordPress. Redis supports complex data structures (hashes, sets, lists), fine-grained cache tagging, asynchronous lazy eviction, and superior native integration within the LiteSpeed Cache plugin. Memcached is limited to simple string values and lacks advanced eviction policies.<\/p>\n<\/details>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">Does Redis replace LiteSpeed&#8217;s Full-Page Cache (LSCache)?<\/summary>\n<p style=\"margin-top:10px;color:#444\">No. Redis and LiteSpeed Full-Page Cache operate at completely different layers of the infrastructure stack. LSCache intercepts public web requests at the HTTP server level and serves static HTML without executing PHP. Redis operates within the PHP runtime to store database query results for uncacheable dynamic requests, WooCommerce carts, and logged-in user dashboards. They are complementary, not mutually exclusive.<\/p>\n<\/details>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">How much RAM should I allocate to Redis for an enterprise WordPress site?<\/summary>\n<p style=\"margin-top:10px;color:#444\">For standard content-heavy sites, 256MB to 512MB is typically sufficient to store all autoloaded options and transient queries. For large-scale WooCommerce stores with more than 10,000 SKUs and high concurrent customer traffic, allocate between 1GB and 2GB of dedicated RAM. Always enforce an eviction policy such as <code>allkeys-lru<\/code> to prevent out-of-memory crashes.<\/p>\n<\/details>\n<details class=\"wp-block-group\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:4px;padding:14px;margin-bottom:12px\">\n<summary style=\"cursor:pointer;font-weight:600;color:#001b41\">Why does LiteSpeed Cache show &#8220;Connection Refused&#8221; when using UNIX sockets?<\/summary>\n<p style=\"margin-top:10px;color:#444\">This issue almost always stems from Linux file permission mismatches. When Redis creates <code>\/var\/run\/redis\/redis-server.sock<\/code>, it is owned by the <code>redis<\/code> user and group. LiteSpeed&#8217;s PHP worker (running under <code>nobody<\/code> or your virtual host user) must have read\/write access. Ensure <code>unixsocketperm<\/code> is set to <code>770<\/code> in <code>redis.conf<\/code> and add the web server user to the <code>redis<\/code> system group.<\/p>\n<\/details>\n<div class=\"wp-block-group has-background\" style=\"background:#f9f9f9;border:1px solid #e7e7e7;border-radius:8px;padding:32px;margin:40px 0;text-align:center\">\n<h3 style=\"color:#001b41;margin-top:0;font-size:24px;font-weight:700\">Deploy Enterprise-Grade Production Infrastructure<\/h3>\n<p style=\"color:#444;font-size:16px;line-height:1.6;max-width:680px;margin:12px auto 24px auto\">Need guaranteed performance with zero price hikes? Host mission-critical workloads on <strong style=\"color:#001b41\">MeraHost<\/strong> with pure Enterprise NVMe, LiteSpeed Web Server, and Same Renewal Price, Always (starting at \u20b999\/mo).<\/p>\n<div class=\"wp-block-buttons\" style=\"display:flex;gap:16px;justify-content:center;flex-wrap:wrap\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\" href=\"https:\/\/merahost.org\" style=\"background:#001b41;color:#ffffff;font-weight:700;padding:12px 28px;border-radius:4px;text-decoration:none;display:inline-block;font-size:15px\">Explore MeraHost NVMe Cloud &rarr;<\/a><\/div>\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link\" href=\"https:\/\/cpanelfree.com\" style=\"background:transparent;color:#001b41;font-weight:600;padding:12px 24px;border:2px solid #001b41;border-radius:4px;text-decoration:none;display:inline-block;font-size:15px\" rel=\"nofollow noopener\" target=\"_blank\">Deploy Free Staging on CpanelFree<\/a><\/div>\n<\/div>\n<\/div>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;924&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;20&quot;,&quot;title&quot;:&quot;The Impact of Redis on LiteSpeed WordPress Hosting&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 20px; height: 20px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 16px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Discover how pairing Redis Object Cache with LiteSpeed Web Server eliminates dynamic MySQL query bottlenecks. Achieve sub-100ms TTFB on high-concurrency sites.<\/p>\n","protected":false},"author":1,"featured_media":923,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[135],"tags":[126,125,136,129,127],"class_list":["post-924","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-optimization","tag-devops","tag-linux","tag-optimization","tag-performance","tag-sysadmin"],"views":2,"_links":{"self":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/posts\/924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/comments?post=924"}],"version-history":[{"count":0,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/posts\/924\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/media\/923"}],"wp:attachment":[{"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/media?parent=924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/categories?post=924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merahost.org\/blog\/wp-json\/wp\/v2\/tags?post=924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}