How to optimize WordPress with AccelerateWP, Redis and cache

Category: WordPress

WordPress speed depends less on the “fast theme” and more on well-configured cache, modern PHP and a clean database. On NubeHost you have AccelerateWP integrated into cPanel and direct support for Redis, LiteSpeed Cache and QUIC.cloud — all free. This guide covers the recommended order to reach 90+ on PageSpeed without touching code.

Before you start

  • Access to the domain’s cPanel.
  • WordPress 6.x with PHP 8.4 or 8.5 (the first step is upgrading if you’re below).
  • Plan with AccelerateWP enabled (included in all NubeHost plans).
  • Prior backup from Backup Wizard or WP Toolkit.
  • A baseline metric before you start: run https://pagespeed.web.dev/ against your home and save the score.

Why optimize (it’s not just SEO)

Core Web Vitals metric“Good” thresholdImpact if you fail
LCP (Largest Contentful Paint)< 2.5sUser perceives slow → bounce
INP (Interaction to Next Paint)< 200msSluggish UI feel
CLS (Cumulative Layout Shift)< 0.1Accidental clicks, frustration
TTFB (Time to First Byte)< 600msGoogle penalizes ranking

Every extra 100ms cuts conversion ~1% in e-commerce; sites under 2s convert 2-3× more than those over 5s.

Layer 1 — PHP 8.x + OPcache

Highest-impact change with zero risk.

  1. In cPanel open Select PHP Version.
  2. Switch to PHP 8.2 (stable) or 8.3 (faster).
  3. In Options confirm:
    • opcache.enable = On
    • opcache.memory_consumption = 128 (or higher)
    • memory_limit = 256M
    • max_execution_time = 120
  4. In Extensions enable: opcache, igbinary, redis, imagick, intl.

PHP 8.2 vs 7.4 delivers between 2× and 3× more throughput without changing a single line of your site.

Layer 2 — AccelerateWP in cPanel

AccelerateWP is CloudLinux’s WordPress integration: it detects your site, suggests optimizations and applies page cache, object cache and asset optimization from a single panel.

Enable AccelerateWP

  1. In cPanel search for AccelerateWP.
  2. Select the detected WordPress site.
  3. Click Optimize Now.
  4. Accept the default recommendations (you can fine-tune later).

Key features it activates

  • PHP X-Ray: profiles which request consumes the most CPU.
  • Smart Advice: suggests upgrades specific to your load (object cache, CDN, etc.).
  • Object Cache (Redis/Memcached): caches WordPress queries in memory.
  • CSS/JS optimization: minifies, combines and defers non-critical scripts.
  • Image optimization: converts to WebP automatically and applies lazy load.
  • Lite Mode: page cache for anonymous visitors.

Verify AccelerateWP is active

After Optimize Now, open the site in incognito and check the HTTP header:

curl -sI https://tudominio.com/ | grep -i 'x-cache\|x-litespeed\|x-acceleratewp'

You should see X-Cache: HIT or X-LiteSpeed-Cache: hit on the second reload.

Layer 3 — Redis Object Cache

WordPress runs hundreds of queries per page; the object cache stores them in RAM and removes up to 80% of the load on MySQL.

When to enable it

  • Sites with WooCommerce, LMS or memberships (large catalog, complex queries).
  • Dynamic pages that can’t be cached as static HTML.
  • More than 5,000 visits/day.

Setup

  1. In cPanel → AccelerateWP enable Object Cache (select Redis).
  2. In WordPress install the official Redis Object Cache plugin (by Till Krüss).
  3. In Settings → Redis click Enable Object Cache.
  4. Verify it shows Status: Connected.

Validate it’s working

After enabling, browse 10–15 different pages. In Settings → Redis you should see:

  • Hits climbing (queries served from RAM).
  • Hit ratio > 95% on mature sites.
  • Memory used stable (not growing forever).

Note: if hit ratio stays under 60%, check that no plugin is flushing cache on every request (typical with badly configured security plugins).

Layer 4 — LiteSpeed Cache + QUIC.cloud

NubeHost servers run LiteSpeed Web Server, which gets huge benefits from LiteSpeed Cache (LSCache) — server-level cache (faster than any PHP plugin).

Install and configure

  1. In WordPress install LiteSpeed Cache (free, official).
  2. Go to LiteSpeed Cache → General and connect with QUIC.cloud (free up to a traffic threshold).
  3. In Cache enable:
    • Enable Cache: ON
    • Cache Logged-in Users: OFF (unless you know what you’re doing)
    • Cache REST API: ON
    • Cache Mobile: ON (if your theme serves different HTML on mobile)
  4. In TTL leave the defaults (1 day for public, 1h for feeds).

Asset optimization

In Page Optimization:

FeatureRecommendation
CSS MinifyON
CSS CombineON (test; some themes break)
JS MinifyON
JS CombineOFF at first (breaks many themes)
Inline CSS AsyncON
Load JS DeferredON (Defer mode)
Lazy Load ImagesON
WebP ReplacementON
Critical CSSON (generated via QUIC.cloud)
Remove Unused CSSON (test; heavy on QUIC.cloud)

CDN with QUIC.cloud

QUIC.cloud serves static assets from global edges. Enable:

  1. CDN → QUIC.cloud CDN: ON.
  2. Accept DNS-only mode (you don’t need to move nameservers).
  3. Wait 5–10 minutes for it to warm up.

You can then see the cache hits in the QUIC.cloud dashboard (https://my.quic.cloud/).

Layer 5 — Database cleanup

Bloated databases kill TTFB. Do this every 1–3 months.

What to clean

  1. Post revisions: WordPress saves every save as a revision. Limit to 5:
    define( 'WP_POST_REVISIONS', 5 );
    
  2. Expired transients: many plugins create temporary caches that never purge.
  3. Spam and trash comments.
  4. Tables from uninstalled plugins (tidy plugins drop them; sloppy ones don’t).
  5. Huge autoload = yes rows: check with SQL:
    SELECT option_name, LENGTH(option_value) AS size
    FROM wp_options
    WHERE autoload = 'yes'
    ORDER BY size DESC LIMIT 20;
    
    Any option_value > 1 MB that autoloads is eating RAM on every request.

Plugin WP-Optimize or Advanced Database Cleaner: schedule weekly cleanup. Take a backup before the first run.

Layer 6 — Images

Images are ~70% of a typical page weight.

ActionImpact
Convert to WebP-30% weight vs JPG
Native lazy load (loading="lazy")-40% LCP on long pages
Serve responsive sizes (srcset)-50% on mobile
Compress at quality 75–85-50% with no visible loss

Enable everything from LiteSpeed Cache → Image Optimization (free via QUIC.cloud) or from the AccelerateWP Image Optimization plugin.

Layer 7 — Theme and plugins

The best optimization is not loading what you don’t use.

  • Plugins deactivated but installed: in some cases they still load code. Delete the ones you don’t use.
  • Heavy page builders (Elementor, Divi, WPBakery): disable modules you don’t use and purge their non-critical CSS/JS from their own options.
  • Home page sliders: cost 200–500ms of LCP. Replace with static image + link.
  • Custom web fonts: use font-display: swap and preload them in the <head>.

Final validation

After all changes:

  1. Clear cache: LiteSpeed Cache → Toolbox → Purge All.
  2. Open https://pagespeed.web.dev/ and measure your home.
  3. Compare against the baseline.
  4. Also measure an inner page, a WooCommerce page and a blog post — different templates, different numbers.
  5. Repeat from simulated mobile 4G.

Verification

  • PHP 8.2 or 8.3 with OPcache active.
  • AccelerateWP running and “optimized”.
  • Object Cache (Redis) with hit ratio > 90%.
  • LiteSpeed Cache connected to QUIC.cloud.
  • CSS/JS minified, lazy load active, WebP served.
  • Database clean, autoload < 1 MB.
  • PageSpeed score > 85 mobile, > 95 desktop.
  • LCP < 2.5s, INP < 200ms, CLS < 0.1.

Common optimization mistakes

  • Turning on every LiteSpeed Cache option at once: breaks the site. Activate per layer, measure, then advance.
  • Combining JS without testing: many themes depend on load order. If it breaks, leave it OFF.
  • Forgetting to purge after every theme/plugin change: you’ll see the old version for days.
  • Running multiple cache plugins at once: they fight each other. Only one (LiteSpeed Cache if you’re on NubeHost).
  • Ignoring TTFB and focusing only on the frontend: if the server takes 2s to respond, no CSS trick saves you.
  • Not measuring before/after: without a baseline you don’t know if you improved or made it worse.

Still need help?

If this guide didn’t solve your issue, our team can help you via ticket.