Skip to content

16. Optimizing WordPress Performance

After securing your WordPress installation, the next step is optimizing its performance. This section covers essential optimization techniques that will:

  1. Reduce server resource usage
  2. Improve page load times
  3. Handle more concurrent visitors
  4. Enhance overall user experience

WordPress automatically saves revisions of your posts and pages as you edit them. While useful for content recovery, excessive revisions can bloat your database.

You can control post revisions by adding a directive to your wp-config.php file:

# Navigate to your WordPress installation
cd /var/www/example.com/
sudo vim public_html/wp-config.php

Add one of these lines to your configuration:

// Disable post revisions completely
define('WP_POST_REVISIONS', false);
// Or limit to a specific number (recommended: 3-5)
define('WP_POST_REVISIONS', 3);

After making changes, restart PHP-FPM to clear the opcache:

sudo systemctl restart php8.3-fpm

WordPress can be memory-intensive, especially with complex themes and plugins. Increasing the memory limit can prevent “out of memory” errors.

First, increase the memory limit in your PHP-FPM pool configuration:

# Edit your site's PHP-FPM pool configuration
sudo vim /etc/php/8.3/fpm/pool.d/example.com.conf

Find and modify the memory limit line:

; Increase from default 32M to 256M
;php_admin_value[memory_limit] = 32M
php_admin_value[memory_limit] = 256M

Also set the memory limit in WordPress itself:

# Edit your WordPress configuration
sudo vim /var/www/example.com/public_html/wp-config.php

Add this line to your configuration:

/** Memory Limit for WordPress */
define('WP_MEMORY_LIMIT', '256M');

16.4. Replacing the WP CRON with a REAL CRON

Section titled “16.4. Replacing the WP CRON with a REAL CRON”

WordPress uses a virtual cron system (WP-Cron) that triggers on page loads, which can be inefficient and unreliable. Replacing it with a real system cron job improves performance and reliability.

First, disable the built-in WP-Cron:

# Edit your WordPress configuration
sudo vim /var/www/example.com/public_html/wp-config.php

Add this line to your configuration:

/** Disable the built-in cron system */
define('DISABLE_WP_CRON', true);

Restart PHP-FPM to apply changes:

sudo systemctl restart php8.3-fpm

Now, set up a system cron job to trigger WordPress cron events:

# Edit your crontab
crontab -e

Add this line to run WordPress cron every 15 minutes:

# Run WordPress cron every 15 minutes
*/15 * * * * wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Caching is one of the most effective ways to improve WordPress performance. It reduces database queries and PHP execution by storing pre-generated content.

Types of WordPress Sites

For caching purposes, WordPress sites can be categorized as:

  • Static sites: Content rarely changes and is the same for all users (blogs, brochure sites)
  • Dynamic sites: Content changes frequently or is personalized for each user (e-commerce, membership sites)

There are several layers of caching that can be implemented:

  1. Page Caching: Stores complete HTML pages
  2. Object Caching: Stores the results of database queries
  3. Browser Caching: Instructs browsers to store static assets
  4. CDN Caching: Distributes cached content across global servers

PHP OPcache improves performance by storing precompiled script bytecode in memory, eliminating the need for PHP to load and parse scripts on each request.

Edit your site’s PHP-FPM pool configuration:

# Navigate to the PHP-FPM pool directory
cd /etc/php/8.3/fpm/pool.d/
ls
sudo vim example.com.conf

Add these OPcache settings to your configuration:

; OPCACHE CONFIGURATION - DEVELOPMENT SERVER
php_admin_flag[opcache.enabled] = 1
php_admin_value[opcache.memory_consumption] = 256
php_admin_value[opcache.interned_strings_buffer] = 32
php_admin_value[opcache.max_accelerated_files] = 20000
php_admin_flag[opcache.validate_timestamps] = 1
php_admin_value[opcache.revalidate_freq] = 2
php_admin_flag[opcache.validate_permission] = 1

For production servers, use these settings instead:

; OPCACHE CONFIGURATION - PRODUCTION SERVER
php_admin_flag[opcache.enabled] = 1
php_admin_value[opcache.memory_consumption] = 256
php_admin_value[opcache.interned_strings_buffer] = 32
php_admin_value[opcache.max_accelerated_files] = 20000
php_admin_flag[opcache.validate_timestamps] = 0
php_admin_flag[opcache.validate_permission] = 1

Apply the changes:

sudo systemctl reload php8.3-fpm

16.6.2. Determining Optimal max_accelerated_files

Section titled “16.6.2. Determining Optimal max_accelerated_files”

To determine the optimal value for max_accelerated_files, count the PHP files in your installation:

cd /var/www/
sudo find . -type f -print | grep php | wc -l

Set max_accelerated_files to at least 20% higher than this number.

16.7. Caching a “Static” WordPress Site

Section titled “16.7. Caching a “Static” WordPress Site”

For sites with content that doesn’t change frequently and is the same for all users, you can implement aggressive caching strategies. Choose one of the following methods based on your preferences and requirements.

FastCGI caching is a server-level caching solution built into Nginx. It’s highly efficient and doesn’t require WordPress plugins.

16.7.1.1. Configuring Nginx for FastCGI Caching

Section titled “16.7.1.1. Configuring Nginx for FastCGI Caching”

First, edit the main Nginx configuration:

cd /etc/nginx
sudo vim nginx.conf

Add the following directives to the http context (just above the “Virtual Host Configs” comment):

### FASTCGI CACHING
# fastcgi_cache_path directive - PATH & NAME must be unique for each site
# Add a new fastcgi_cache_path for each site and give a new keys_zone name
fastcgi_cache_path /var/run/SITE levels=1:2 keys_zone=NAME:100m inactive=60m;
# applied to all sites
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;

Create a file for cache exclusion rules:

cd /etc/nginx/includes/
sudo vim fastcgi_cache_excludes.conf

Add these rules to exclude dynamic content from caching:

# NGINX SKIP CACHE INCLUDE FILE
set $skip_cache 0;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $skip_cache 1;
}
if ($query_string != "") {
set $skip_cache 1;
}
# Don't cache uris containing the following segments
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}

16.7.1.3. Updating Your Site’s Nginx Configuration

Section titled “16.7.1.3. Updating Your Site’s Nginx Configuration”

Edit your site’s Nginx configuration:

cd /etc/nginx/sites-available
sudo vim example.com.conf

Add these lines to your server block:

# Include cache exclusion rules
include /etc/nginx/includes/fastcgi_cache_excludes.conf;
# Add cache status header
add_header X-FastCGI-Cache $upstream_cache_status;
# Add these directives to the PHP location block
location ~ \.php$ {
# Existing PHP handling directives...
# FastCGI cache directives
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
fastcgi_cache NAME;
fastcgi_cache_valid 60m;
}

Add a location block for purging the cache:

# Add this to your server block
location ~ /purge(/.*) {
fastcgi_cache_purge NAME "$scheme$request_method$host$1";
}

Apply the changes:

sudo nginx -t
sudo systemctl reload nginx

Test if caching is working:

# First request should show MISS
curl -I https://example.com
# Second request should show HIT
curl -I https://example.com

Look for the X-FastCGI-Cache header in the response.

16.7.1.6. Removing FastCGI Caching (If Needed)

Section titled “16.7.1.6. Removing FastCGI Caching (If Needed)”

If you need to remove FastCGI caching:

cd /etc/nginx/sites-available
sudo vim example.com.conf

Comment out or remove these lines:

# Remove or comment out these lines
# include /etc/nginx/includes/fastcgi_cache_excludes.conf;
# add_header X-FastCGI-Cache $upstream_cache_status;
# In the PHP location block, remove or comment:
# fastcgi_cache_bypass $skip_cache;
# fastcgi_no_cache $skip_cache;
# fastcgi_cache NAME;
# fastcgi_cache_valid 60m;
# Remove the purge location block
# location ~ /purge(/.*) {
# fastcgi_cache_purge NAME "$scheme$request_method$host$1";
# }

Apply the changes:

sudo nginx -t
sudo systemctl reload nginx
sudo systemctl restart php8.3-fpm

WP Super Cache is a popular WordPress caching plugin that generates static HTML files from your dynamic WordPress content.

  1. Log in to your WordPress admin dashboard
  2. Go to Plugins > Add New
  3. Search for “WP Super Cache”
  4. Click “Install Now” and then “Activate”

16.7.2.2. Configuring Nginx for WP Super Cache

Section titled “16.7.2.2. Configuring Nginx for WP Super Cache”

Create a configuration file for WP Super Cache:

cd /etc/nginx/includes/
sudo vim wp_super_cache_excludes.conf

Add these rules:

# WP Super Cache NGINX Cache Exclusions Rules
set $cache_uri $request_uri;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}
# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'null cache';
}
# Use cached or actual file if they exists, otherwise pass request to WordPress
location / {
try_files /wp-content/cache/supercache/$http_host/$cache_uri/index-https.html $uri $uri/ /index.php?$args;
}

Update your site’s Nginx configuration:

cd /etc/nginx/sites-available/
sudo vim example.com.conf

Comment out the default location block and include the WP Super Cache configuration:

# Comment out the default location block
# location / {
# try_files $uri $uri/ /index.php$is_args$args;
# }
# Include WP Super Cache configuration
include /etc/nginx/includes/wp_super_cache_excludes.conf;

Apply the changes:

sudo nginx -t
sudo systemctl reload nginx

16.7.2.3. Configuring WP Super Cache Plugin

Section titled “16.7.2.3. Configuring WP Super Cache Plugin”
  1. Go to Settings > WP Super Cache in your WordPress admin
  2. Enable caching by selecting “Caching On”
  3. Under Advanced tab:
    • Select “Use mod_rewrite to serve cache files”
    • Check “Compress pages”
    • Check “Don’t cache pages for known users”
    • Check “Cache rebuild”
  4. Click “Update Status”

16.7.2.4. Removing WP Super Cache (If Needed)

Section titled “16.7.2.4. Removing WP Super Cache (If Needed)”

If you need to remove WP Super Cache:

  1. Deactivate and uninstall the plugin from WordPress admin

  2. Restore your Nginx configuration:

cd /etc/nginx/sites-available/
sudo vim example.com.conf

Remove the WP Super Cache include and restore the default location block:

# Remove this line
# include /etc/nginx/includes/wp_super_cache_excludes.conf;
# Uncomment the default location block
location / {
try_files $uri $uri/ /index.php$is_args$args;
}

Apply the changes:

sudo nginx -t
sudo systemctl reload nginx
sudo systemctl reload php8.3-fpm

W3 Total Cache is a comprehensive caching plugin with extensive configuration options for various caching methods.

  1. Log in to your WordPress admin dashboard
  2. Go to Plugins > Add New
  3. Search for “W3 Total Cache”
  4. Click “Install Now” and then “Activate”

16.7.3.2. Preparing for W3TC Nginx Integration

Section titled “16.7.3.2. Preparing for W3TC Nginx Integration”

Create a file for W3TC to write its Nginx rules:

cd /var/www/example.com/public_html/
sudo touch nginx.conf
sudo chown username:username nginx.conf
sudo chmod 660 nginx.conf

Add a security directive to prevent direct access to the nginx.conf file:

cd /etc/nginx/includes/
sudo vim nginx_security_directives.conf

Add this line:

location = /nginx.conf { deny all; }

16.7.3.3. Creating W3TC Cache Exclusion Rules

Section titled “16.7.3.3. Creating W3TC Cache Exclusion Rules”

Create a configuration file for W3TC cache exclusions:

cd /etc/nginx/includes/
sudo vim w3tc_cache_excludes.conf

Add these rules:

# ---------------------
# W3 TOTAL CACHE EXCLUDES FILE
# ---------------------
set $cache_uri $request_uri;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}
# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'null cache';
}
# Use cached or actual file if file exists, otherwise pass request to WordPress
location / {
try_files /wp-content/w3tc/pgcache/$cache_uri/_index.html $uri $uri/ /index.php?$args;
}

16.7.3.4. Updating Your Site’s Nginx Configuration

Section titled “16.7.3.4. Updating Your Site’s Nginx Configuration”

Edit your site’s Nginx configuration:

cd /etc/nginx/sites-available/
sudo vim example.com.conf

Comment out the default location block and include the W3TC configurations:

# Comment out the default location block
#location / {
# try_files $uri $uri/ /index.php$is_args$args;
#}
# Include W3TC configurations
include /etc/nginx/includes/w3tc_cache_excludes.conf;
include /var/www/example.com/public_html/nginx.conf;

Install the PHP Tidy extension required by W3TC:

sudo apt update
sudo apt install php8.3-tidy

Apply the changes:

sudo nginx -t
sudo systemctl reload nginx
sudo systemctl reload php8.3-fpm

16.7.3.5. Configuring W3 Total Cache Plugin

Section titled “16.7.3.5. Configuring W3 Total Cache Plugin”
  1. Go to Performance > General Settings in your WordPress admin
  2. Enable Page Cache and set Method to “Disk: Enhanced”
  3. Enable Browser Cache
  4. Enable Minify (optional)
  5. Under Performance > Page Cache:
    • Check “Cache SSL”
    • Check “Don’t cache pages for logged in users”
  6. Save all settings

16.7.3.6. Removing W3 Total Cache (If Needed)

Section titled “16.7.3.6. Removing W3 Total Cache (If Needed)”

If you need to remove W3 Total Cache:

  1. Deactivate and uninstall the plugin from WordPress admin

  2. Restore your Nginx configuration:

cd /etc/nginx/sites-available/
sudo vim example.com.conf

Remove the W3TC includes and restore the default location block:

# Restore the default location block
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
# Remove these lines
# include /etc/nginx/includes/w3tc_cache_excludes.conf;
# include /var/www/example.com/public_html/nginx.conf;

Remove W3TC files:

cd /var/www/example.com/public_html/wp-content/
sudo rm -rf cache/ w3tc-config/
cd /var/www/example.com/public_html/
sudo rm nginx.conf

Apply the changes:

sudo systemctl reload php8.3-fpm
sudo systemctl reload nginx

16.8. Create a Persistent Object Cache using Redis

Section titled “16.8. Create a Persistent Object Cache using Redis”

Object caching stores the results of database queries in memory, significantly reducing database load. Redis is an excellent choice for object caching due to its speed and persistence capabilities.

Install Redis server and the PHP Redis extension:

sudo apt update
sudo apt install redis-server php8.3-redis

Verify Redis is running:

sudo systemctl status redis-server

Check the Redis log for any warnings or errors:

sudo cat /var/log/redis/redis-server.log

16.8.2.1. Fixing Memory Overcommit Warning

Section titled “16.8.2.1. Fixing Memory Overcommit Warning”

If you see this warning in the Redis logs:

WARNING overcommit_memory is set to 0! Background save may fail under low memory condition.

Fix it by creating a sysctl configuration file:

cd /etc/sysctl.d/
sudo vim 11-redis.conf

Add this line:

vm.overcommit_memory = 1

Configure Redis memory limits:

sudo vim /etc/redis/redis.conf

Find and modify these settings:

# Set maximum memory to use (adjust based on your server resources)
maxmemory 256mb
# Set eviction policy (LRU = Least Recently Used)
maxmemory-policy allkeys-lru

Apply the changes:

sudo systemctl restart redis-server

16.8.3. Configuring WordPress for Redis Object Caching

Section titled “16.8.3. Configuring WordPress for Redis Object Caching”

16.8.3.1. Installing a Redis Object Cache Plugin

Section titled “16.8.3.1. Installing a Redis Object Cache Plugin”
  1. Log in to your WordPress admin dashboard
  2. Go to Plugins > Add New
  3. Search for “Redis Object Cache”
  4. Install and activate the plugin by Till Krüss

16.8.3.2. Adding Redis Configuration to WordPress

Section titled “16.8.3.2. Adding Redis Configuration to WordPress”

Edit your WordPress configuration:

cd /var/www/example.com/public_html/
sudo vim wp-config.php

Add these lines:

/** Redis Object Cache Settings */
define('WP_CACHE_KEY_SALT', 'example.com');

If you’re running WooCommerce, you need special configuration to prevent caching of session data:

/** PREVENT REDIS CACHING WOO SESSION DATA */
define('WP_REDIS_IGNORED_GROUPS', 'wc_session');

Also, exclude these pages from page caching:

  • /cart/
  • /my-account/
  • /checkout/

And exclude these cookies from cache key generation:

  • woocommerce_cart_hash
  • woocommerce_items_in_cart
  • wp_woocommerce_session_
  • woocommerce_recently_viewed
  • store_notice[notice id]
  • _wc_session_

16.9. Caching a “Dynamic” WordPress Site

Section titled “16.9. Caching a “Dynamic” WordPress Site”

For sites with personalized content or frequent changes (e-commerce, membership sites), you need a different caching approach that combines page caching with object caching.

16.9.1. Introduction to Dynamic Site Caching

Section titled “16.9.1. Introduction to Dynamic Site Caching”

Dynamic sites require:

  1. Object caching (Redis) to reduce database load
  2. Selective page caching that excludes personalized content
  3. Browser caching for static assets

16.9.2. WP Super Cache and Redis Combination

Section titled “16.9.2. WP Super Cache and Redis Combination”

This approach uses WP Super Cache for page caching with careful exclusions and Redis for object caching.

  1. Follow the Redis installation steps from section 16.8
  2. Follow the WP Super Cache installation steps from section 16.7.2
  3. In WP Super Cache settings:
    • Enable “Don’t cache pages for known users”
    • Add custom exclusions for dynamic pages

This approach uses W3 Total Cache with Redis as the object cache backend.

  1. Follow the Redis installation steps from section 16.8
  2. Follow the W3TC installation steps from section 16.7.3
  3. In W3TC Performance > General Settings:
    • Set Object Cache method to “Redis”
    • Configure Redis host (usually “localhost”) and port (6379)
  4. In Page Cache settings:
    • Enable “Don’t cache pages for logged in users”
    • Add custom exclusions for dynamic pages

Proper PHP-FPM configuration is crucial for optimal WordPress performance.

First, identify your PHP-FPM pool users:

# Display all PHP-FPM pool usernames
grep -E '^\s*user\s*=' /etc/php/8.3/fpm/pool.d/*.conf | awk -F= '{print $2}' | xargs | tr ' ' '\n' | sort -u

Calculate the average memory usage per PHP-FPM process:

# Replace POOL_USER with your actual pool username
ps -C php-fpm --user POOL_USER -o rss= | awk '{ sum += $1; count++ } END { if (count > 0) printf ("%d%s\n", sum/NR/1024,"M") }'

Example:

ps -C php-fpm --user wordpress_user -o rss= | awk '{ sum += $1; count++ } END { if (count > 0) printf ("%d%s\n", sum/NR/1024,"M") }'

16.10.2. Configuring OnDemand Process Manager

Section titled “16.10.2. Configuring OnDemand Process Manager”

For most WordPress sites, the “ondemand” process manager is optimal:

cd /etc/php/8.3/fpm/pool.d/
sudo vim example.com.conf

Update the process manager settings:

; Use ondemand process manager
pm = ondemand
; Set max_children based on: (Total RAM - Reserved RAM) / Average Process Size
; Example: (2048MB - 512MB) / 50MB = 30
pm.max_children = 30
; Kill idle processes after 10 seconds
pm.process_idle_timeout = 10s
; Restart processes after handling 500 requests
pm.max_requests = 500

Apply the changes:

sudo systemctl reload php8.3-fpm

Check if your PHP-FPM processes are hitting limits:

sudo grep max_children /var/log/php8.3-fpm.log

If you see this warning, increase your pm.max_children setting:

WARNING: [pool www] server reached max_children setting (25), consider raising it

Cloudflare is a Content Delivery Network (CDN) and security service that can significantly improve WordPress performance and security.

  1. Global CDN: Serves cached content from data centers around the world
  2. DDoS Protection: Mitigates distributed denial-of-service attacks
  3. Web Application Firewall: Blocks common attack vectors
  4. SSL/TLS: Provides free SSL certificates and optimized TLS connections
  5. Image Optimization: Automatically optimizes images for faster loading

To ensure proper visitor IP logging when using Cloudflare, you need to configure Nginx to recognize Cloudflare’s IP addresses:

cd /etc/nginx/includes
sudo vim cloudflare_ip_list.conf

Add the Cloudflare IP ranges:

# Cloudflare IP ranges
# Last updated OCT 2022 - Check https://www.cloudflare.com/ips for updates
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/13;
set_real_ip_from 104.24.0.0/14;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2a06:98c0::/29;
set_real_ip_from 2c0f:f248::/32;
real_ip_header CF-Connecting-IP;

Include this file in your site’s Nginx configuration:

cd /etc/nginx/sites-available/
sudo vim example.com.conf

Add this line to your server block:

include /etc/nginx/includes/cloudflare_ip_list.conf;

Apply the changes:

sudo nginx -t
sudo systemctl reload nginx
Section titled “16.11.3. Recommended Cloudflare Settings for WordPress”

After signing up for Cloudflare and pointing your domain to their nameservers:

  1. SSL/TLS: Set to “Full” or “Full (Strict)” if you have a valid SSL certificate
  2. Caching:
    • Set caching level to “Standard”
    • Enable “Always Online”
    • Set browser cache TTL to at least 4 hours
  3. Speed:
    • Enable Auto Minify for HTML, CSS, and JavaScript
    • Enable Brotli compression
    • Enable Early Hints
    • Enable Rocket Loader for JavaScript
  4. Page Rules:
    • Create a rule to bypass cache for /wp-admin/*
    • Create a rule to bypass cache for login and checkout pages

Optimizing WordPress performance is a multi-layered approach that involves:

  1. Server-level optimizations: PHP-FPM tuning, OPcache configuration
  2. WordPress configuration: Post revisions, memory limits, WP-Cron
  3. Caching strategies: Page caching, object caching, browser caching
  4. Content delivery: CDN integration with Cloudflare

Remember that performance optimization is an ongoing process. Regularly monitor your site’s performance using tools like:

  • Google PageSpeed Insights
  • GTmetrix
  • WebPageTest

Adjust your optimization strategy based on your specific WordPress site’s needs and traffic patterns.