Improving performance of a WordPress site

I can categorize the things that can be done to improve performance of a WordPress site as follows. The prioritization can be changed according to the initial testing results. Also, every single item might not be applicable for every WordPress site. Testing and planning phase is very important to decide which tasks need to be done on which site.

  • Initial Performance Testing
    • Test the site on services like GTMetrix, Google PageSpeed Insights, Pingdom, and register the records.
    • Check Google Search Console “Core Web Vitals” section for already detected issues.
    • Create a plan to list what needs to be done first to get more juice in shorter time.
  • Frontend/Browser Side Improvements
    • Assets Optimizations
      • Image Files
        • Image Responsive Sizing
        • Image Compressions
        • Image Conversions (PNG -> JPG, JPG->WEBP, etc.)
        • Lazy Loading
      • Video Files
        • Video outsourcing if possible (Using Vimeo, Youtube)
        • Video Responsive Sizing
        • Video Compressions
        • Video Conversions (MOV -> MP4, MP4 -> WEBM, etc.)
        • Lazy Loading, and/or facade
      • SVG Files
        • SVG Compression
        • Minifying
      • PDF Files
        • PDF Compression
      • CSS & JS Files
        • Decrease the number of unused CSS & JS files
          • By calling them only when needed
          • Or removing if never used
        • Eliminating render blocking CSS & JS files
          • JS – by async/defer attributes
          • CSS – by collecting Critical CSSs
        • Grouping and combining to reduce request count
        • Minifying
      • Auto optimizing future assets/media items
      • Browser Caching
        • Cache Policy Configurations
      • Transfer Compression (Gzip, Brotli, etc.)
      • Using a CDN Service
    • 3rd Parties Optimizing
      • Reduce and/or lazy load the 3rd party services
      • Use a service like CloudFlare Zaraz, PartyTown, etc.
    • AMP
  • Backend Side Improvements
    • Theme & Plugin Optimizations
      • Delete themes & plugins that are not being used
      • Using a light/performant theme & plugin if possible
      • Update the themes & plugins
      • Custom plugins, themes or child themes code optimizations
        • Eliminate redundant DB queries
        • Use transients when needed
        • Control the memory consumptions
        • Use native WP functions as much as possible
        • Use custom DB tables if there are too many posts added into a custom post type
    • Database & Content Optimizations
      • Repair the DB tables
      • Limit the revisions, or remove that support if not needed
      • Add expiration date for trashed posts
      • Remove unused/duplicate posts, terms, taxonomies, attachments, users, comments, sites, etc. (including drafts, trash, …)
      • Remove unused/duplicate meta data
      • Use a faster/performant DB
      • Update the version of DB server
      • Use a managed DB service
      • Show less data on a single URL (like archive pages)
    • Caching
      • Object Caching (Redis, Memcached, etc.)
      • Database Objects Caching
      • Fragments Caching
      • URLs Cache
    • Other Configurations/Limitations for performance
      • Reduce Cron jobs
      • Disable Pingbacks & Trackbacks if possible
      • Configure Heartbeat API
    • Error logs checking & fixing
    • Update WordPress Core
  • Server Side Improvements
    • Using a faster/performant machine for the server
    • Using a faster/performant server (NGINX, LiteSpeed, etc.)
    • Using a managed server
    • SSL Certificate & Configurations
    • Server side caching
  • Network/Proxy Side Improvements
    • Prevent bad bots
    • DDos detection
    • Block admin access, if possible
    • Network side caching (CloudFlare, CloudFront, Varnish, etc.)
      • Serve caches in CDN
    • Cache warmer/generator
    • Scalability
      • Containerizing
      • Load Balancing
  • Final Performance Testing
    • Test the site again on services like GTMetrix, Google PageSpeed Insights, Pingdom, and compare the records.
    • Create a plan for future performance monitoring & consistency strategy.
  • Monitoring
    • Centralized logging, error alerts
    • Down alerts
    • Automated testing for Core Web Vitals
      • Include into your CI/CD pipeline






One response to “Improving performance of a WordPress site”

  1. Cleo Avatar

    Interesting. I just discovered Lighthouse (I’ve been out of the loop for many years) and noticed it wasn’t mentioned here. I came across this site because I was trying to find some useful rules for my CF installations. So far I like your site because it’s super clean and you get straight to the point. I’d be interested if there were any more tips you might share regarding WP-based optimizations in conjunction with CF. Thanks for the wonderful tips!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.