PageSpeed Optimization Techniques
Recommended tools:
Google PageSpeed Insights (uses Lighthouse to measure core web vitals)
Not recommended due to inaccurate results:
Pingdom Tools
GTMetrix
Many tools provide inaccurate results and unhelpful recommendations
Proper testing methodology ensures reliable performance metrics
Helps identify actual optimization opportunities rather than false issues
Purge all caches:
WordPress cache plugins (Litespeed, WP Rocket, W3 Total, Autoptimize)
Cloudflare cache
Skip only if no changes were made in the past 24 hours
Use incognito mode in your browser:
Windows: Ctrl + Shift + N
Mac: Cmd + Shift + N
Location selection: Test from different geographical locations
Browser selection: Simulate various browsers and devices
Connection speed: Affects mobile scores significantly (try 3G Fast)
Resolution: Choose browser dimensions
For desktop testing:
Desktop browser
Cable connection
3 tests
First view & repeat view
Capture video
Label as "Desktop cable"
For mobile testing:
Mobile device and browser
4G or 3G Fast connection
Same settings as desktop otherwise
PageSpeed optimization tweaks can sometimes break your website
Having a proper backup ensures you can restore to a working state
Database backups are especially important as most configuration issues affect database tables
WordPress websites consist of:
Files in the root directory (public_html)
Database (contains actual content and configurations)
The database is most critical as it stores all your site's content and settings
Install and activate UpdraftPlus plugin
Navigate to: Settings → UpdraftPlus Backups
Click: Backup Now
Select: Database (uncheck others for a quick backup)
Existing backups: View and restore from this section
Remote storage: Configure under Settings tab (Google Drive, OneDrive, etc.)
Access hosting control panel (cPanel)
Find phpMyAdmin under Databases section
Identify your database by looking for tables with "_options" suffix
Confirm correct database by checking siteurl value
Go to Import tab and select the database backup file
Click Go to restore the database
If backup files weren't downloaded:
Go to File Manager in hosting control panel
Navigate to wp-content folder → updraft folder
Find recent backups there
Rename existing public_html to public_html_old
Upload backup and extract it
Protection against DDOS attacks
Fast DNS resolver (improves server response time)
CDN with 250+ data centers worldwide (reduces load time globally)
Free SSL certificates
HTTP/2 support (enables concurrent downloads)
Sign up for a free Cloudflare account
Add your domain
Point your domain nameservers to Cloudflare
Domain Overview:
Use "Purge Cache" after making visual/functional changes
Enable "Development Mode" when actively updating design (auto-disables after 3 hours)
SSL/TLS Settings:
Choose SSL mode carefully:
Off: If no SSL certificate installed
Flexible: Just installed SSL but not fully tested
Full: After completely testing HTTPS on all pages
Edge Certificates options:
Enable "Always use HTTPS" only after full HTTPS verification
Enable HSTS only after confirming HTTPS works site-wide
Set HSTS max age header to 6 months
Enable Preload and No-Sniff header
Choose TLS 1.0 as minimum version
Enable Opportunistic Encryption, TLS 1.3, and Automatic HTTPS rewrites
Firewall Settings:
Security level: Medium (default)
Challenge passage: 1 week
Enable Browser integrity check and Privacy pass support
Speed Settings:
Disable Auto Minify for JavaScript, CSS, and HTML (if using other optimization plugins)
Enable Brotli compression
Enable Rocket Loader
Caching Configuration:
Caching level: Standard
Browser cache expiration: One month/year (or one day for dynamic sites)
Enable Crawler hints
Optional: Enable Always Online feature
Next-generation image format with superior compression algorithms
Significantly reduces image size while maintaining quality
Improves PageSpeed scores by addressing "Serve images in next-gen formats" issue
Lossless compression: No quality loss (recommended)
Lossy compression: Minimal perceived quality loss
WebP: Supports both lossless and lossy compression methods
PHP 7.4 or higher
PHP extensions: Imagick or GD
WebP support on server
Install and activate the plugin
Go to Settings → WebP Converter
Check server configuration compatibility
Enable supported file extensions: jpg, jpeg, png
Enable supported directories: plugins, themes, uploads
Enable WebP as output format
Choose conversion method: Imagick (preferred) or GD
Set image quality (recommended: 90%)
Image loading mode: "via htaccess" (recommended)
Under extra features:
Disable "keep images metadata"
Enable automatic removal of larger WebP files
Enable browser caching
Enable conversion for images outside media library
Enable automatic conversion of uploaded images
Enable force redirections for all domains
Click Save Changes
Regenerate all images
Clear all caches and purge Cloudflare cache
Verify WebP conversion by checking image URLs
Use if WebP Converter for Media doesn't work
Key settings:
Operation mode: "Varied responses" or "CDN friendly"
Enable: prevent using larger WebPs, create WebP files upon request, convert on upload
Configure redirection settings based on operation mode
Proprietary web server software
Drop-in Apache replacement with high performance
Built-in dynamic content acceleration
Small to large WordPress websites needing an all-in-one solution
Sites hosted on LiteSpeed servers seeking better performance without premium costs
WP Rocket: Better if you value your time and page load time
LiteSpeed Cache: Better if you value both PageSpeed score and page loading time
Cloudways doesn't use LiteSpeed server (can't use LiteSpeed Cache)
Cloudways offers Breeze plugin instead
LiteSpeed Cache leads in both PageSpeed score and load time
Cloudways servers with Breeze/W3TC/WP Rocket still faster than shared hosting at same price
General Settings:
Set auto-update preference
Request domain key for Quic.cloud services
Enable Guest mode and Guest optimization
Cache Settings:
Enable cache, cache REST API, cache favicon.ico, cache PHP resources
Enable cache for mobile users if using mobile-specific content or AMP
ESI Settings:
Disable ESI, cache admin bar, and cache comment form
Enable ESI only for WooCommerce or sites with many logged-in users
Object Cache Settings:
Enable object cache if your server supports memcached/Redis
Choose Redis method with port 6379 if available
Browser Cache:
Turn browser cache on
CDN Settings:
Configure Quic.cloud CDN or Cloudflare
Image Optimization:
Enable Auto request cron and Auto Pull cron
Enable Optimize original images
Enable Optimize Losslessly
Disable Preserve EXIF/XMP data
Enable WebP versions and replacements
Page Optimization:
CSS Settings:
Enable CSS minify and combine
Enable Generate UCSS (remove unused CSS)
Enable Load CSS asynchronously
Set Font display optimization to "swap"
JS Settings:
Enable JS minify
Disable JS combine
Set Load JS Deferred to "Deferred"
HTML Settings:
Enable HTML minify, DNS prefetch, Remove query strings
Media Settings:
Enable Lazy load for images, iframes, videos
Enable LQIP cloud generator or responsive placeholder
Enable Add missing sizes
Database Optimization:
Use "Clean all" button (except "All transients")
Heartbeat Control:
Enable Frontend, Backend, and Editor Heartbeat control
Lazy load images
Minify JS & CSS
Generate Critical CSS
Defer non-critical JS
Remove unused CSS
Create and preload page cache
CDN integration
Database optimization
Works on Windows, Nginx, Litespeed or Apache servers
PHP 7+ and Pretty permalinks
Pricing: $49 for 1 site, $249 for unlimited sites
Basic Cache Options:
Enable caching for mobile devices
Leave user cache disabled
Cache lifespan: 7 days (default)
File Optimization:
CSS Files:
Enable Minify CSS files
Disable Combine CSS files (for HTTP/2 servers)
Enable Optimize CSS delivery
Enable Remove unused CSS
JavaScript Files:
Enable Minify JavaScript files
Disable Combine JavaScript files
Enable Load JavaScript deferred
Use caution with Delay JavaScript execution
Media Settings:
Enable lazy load for images, iframes, videos
Enable YouTube iframe preview images
Enable Add missing image dimensions
Preload Settings:
Activate preloading and sitemap-based cache
Enable link preloading
Configure prefetch DNS requests if needed
Configure preload fonts if using self-hosted fonts
Additional Options:
Database optimization (Database tab)
CDN integration (CDN tab)
Use these four plugins together:
Cache plugin (W3 Total Cache or Breeze)
Debloat plugin for JS/CSS optimization
OMGF (Optimize My Google Fonts)
WebP converter plugin
Achieves excellent PageSpeed scores (mobile 99, desktop 100) even on WooCommerce sites
Works on cheap shared hosting despite server response time limitations
Go to Performance → Setup Guide
Test and choose optimal settings for:
Page cache (choose lowest response time option)
Database cache (choose "none" if only disk cache is available)
Object cache (avoid disk cache method)
Browser cache (enable)
Enable Lazy load images
General Settings:
Enable page cache, opcode cache (if available)
Enable database/object cache if using non-disk methods
Enable browser cache
Do NOT enable minify (will use Debloat plugin instead)
CSS Optimization:
Enable Fix render blocking CSS
Enable Inline Optimized CSS
Enable Minify CSS
Enable page builder support if needed
Enable Remove unused CSS
Enable Remove CSS on all pages
JS Optimization:
Enable defer JavaScript
Enable minify JavaScript
Enable page builder support if needed
Enable delay JavaScript (1s maximum delay)
Enable "disable for admins"
Optimization Settings:
Optimization mode: Manual (default)
Font display: swap
Uncheck unused font stylesheets
Disable optimization for admins
Detection Settings:
Google fonts processing: Replace
Advanced Settings:
Enable remove settings at uninstall
If your site breaks, disable these options one by one:
Remove unused CSS
Fix render blocking CSS
After each change:
Save changes
Empty all caches in Debloat
Purge all caches in W3 Total Cache
Check site in incognito window
Theme/plugins not optimized for page speed
Shared hosting limitations
Perfect scores aren't necessary: It's not important to chase a 100/100 Google PageSpeed score
Green score (90+) is sufficient: What really matters is the actual page loading time
Focus on real-world performance rather than perfect test scores
Cable: 2s first view, 1s repeat view
4G: 3s first view, 1.5s repeat view
3G: 3.5s first view, 2s repeat view
Slow hosting
Non-optimized theme
Poor front-end plugins/scripts
Hosting Improvements:
Switch to VPS or Cloud VPS (e.g., Cloudways)
Even $12 plan on Linode/Cloudways is faster than many shared hosts
Theme Optimization:
Avoid unoptimized drag-and-drop builders
If needed, use speed-optimized builders like Divi
Consider minimalistic themes without extras
Plugin Management:
Avoid pop-up scripts/plugins
Distinguish between front-end plugins (load for visitors) and back-end plugins (admin only)
Remove unnecessary JS/CSS files identified in PageSpeed reports