How to optimize WordPress with AccelerateWP, Redis and cache
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” threshold | Impact if you fail |
|---|---|---|
| LCP (Largest Contentful Paint) | < 2.5s | User perceives slow → bounce |
| INP (Interaction to Next Paint) | < 200ms | Sluggish UI feel |
| CLS (Cumulative Layout Shift) | < 0.1 | Accidental clicks, frustration |
| TTFB (Time to First Byte) | < 600ms | Google 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.
- In cPanel open Select PHP Version.
- Switch to PHP 8.2 (stable) or 8.3 (faster).
- In Options confirm:
opcache.enable = Onopcache.memory_consumption = 128(or higher)memory_limit = 256Mmax_execution_time = 120
- 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
- In cPanel search for AccelerateWP.
- Select the detected WordPress site.
- Click Optimize Now.
- 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
- In cPanel → AccelerateWP enable Object Cache (select Redis).
- In WordPress install the official Redis Object Cache plugin (by Till Krüss).
- In Settings → Redis click Enable Object Cache.
- 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
- In WordPress install LiteSpeed Cache (free, official).
- Go to LiteSpeed Cache → General and connect with QUIC.cloud (free up to a traffic threshold).
- 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)
- In TTL leave the defaults (1 day for public, 1h for feeds).
Asset optimization
In Page Optimization:
| Feature | Recommendation |
|---|---|
| CSS Minify | ON |
| CSS Combine | ON (test; some themes break) |
| JS Minify | ON |
| JS Combine | OFF at first (breaks many themes) |
| Inline CSS Async | ON |
| Load JS Deferred | ON (Defer mode) |
| Lazy Load Images | ON |
| WebP Replacement | ON |
| Critical CSS | ON (generated via QUIC.cloud) |
| Remove Unused CSS | ON (test; heavy on QUIC.cloud) |
CDN with QUIC.cloud
QUIC.cloud serves static assets from global edges. Enable:
- CDN → QUIC.cloud CDN: ON.
- Accept DNS-only mode (you don’t need to move nameservers).
- 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
- Post revisions: WordPress saves every save as a revision. Limit to 5:
define( 'WP_POST_REVISIONS', 5 ); - Expired transients: many plugins create temporary caches that never purge.
- Spam and trash comments.
- Tables from uninstalled plugins (tidy plugins drop them; sloppy ones don’t).
- Huge
autoload = yesrows: check with SQL:AnySELECT option_name, LENGTH(option_value) AS size FROM wp_options WHERE autoload = 'yes' ORDER BY size DESC LIMIT 20;option_value> 1 MB that autoloads is eating RAM on every request.
Recommended tool
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.
| Action | Impact |
|---|---|
| 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: swapand preload them in the<head>.
Final validation
After all changes:
- Clear cache: LiteSpeed Cache → Toolbox → Purge All.
- Open
https://pagespeed.web.dev/and measure your home. - Compare against the baseline.
- Also measure an inner page, a WooCommerce page and a blog post — different templates, different numbers.
- 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.
Recommended readings
Still need help?
If this guide didn’t solve your issue, our team can help you via ticket.