StarDomain

WordPress Performance Optimization

WordPress Performance Optimization

Speed up your WordPress site with these optimization techniques.

Caching

Page Caching

Install a caching plugin:

  • WP Super Cache (free)
  • W3 Total Cache (free)
  • WP Rocket (premium)

Browser Caching

Add to .htaccess:

apache
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/javascript "access 1 month"
</IfModule>

Image Optimization

  • Use WebP format when possible
  • Compress images before upload
  • Use lazy loading
  • Plugins: Smush, ShortPixel, Imagify

Database Optimization

  • Delete post revisions
  • Remove spam comments
  • Clean transients
  • Use WP-Optimize plugin

Code Optimization

  • Minify CSS and JavaScript
  • Combine files where possible
  • Remove unused plugins
  • Use lightweight themes

Hosting Considerations

  • Enable PHP OPcache
  • Use PHP 8.x
  • Consider CDN (Cloudflare)
  • Upgrade hosting if needed

Testing Your Speed

  • Google PageSpeed Insights
  • GTmetrix
  • Pingdom Tools
  • Aim for under 3 seconds load time