LochStudios  /  Help Centre  /  WordPress  /  Speed Up Your WordPress Site

Speed Up Your WordPress Site

Optimize your WordPress performance to improve user experience and search engine rankings.

Updated

WordPress sites can become slow over time as content, plugins, and images accumulate. Fortunately, most performance issues are easy to fix. A faster site improves user experience and boosts your search engine ranking.

Enable Caching

Caching stores static versions of your pages, so WordPress doesn't need to rebuild them from scratch on every visit.

1. Install a caching plugin:
- Popular free options: WP Super Cache, W3 Total Cache, or LiteSpeed Cache.
- Go to Plugins > Add New, search for one, and click "Install Now" then "Activate."
2. Configure the plugin:
- Most caching plugins have a settings page—go to Settings or their dedicated menu item.
- Enable page caching, browser caching, and object caching if available.
- Set cache expiration to 24 hours (or adjust based on how often you update content).
3. Test: Visit your site in an incognito browser window to see a fresh, cached version.

Optimize Your Images

Images are usually the largest files on a web page. Optimizing them dramatically speeds up load times.

1. Compress before uploading:
- Use a free online tool (TinyPNG, ImageOptim, or Optimizilla) to compress images before uploading to WordPress.
- Aim for files under 200 KB for photos, under 50 KB for thumbnails.
2. Use an image optimization plugin:
- Install Smush, ShortPixel, or Imagify (many offer free tiers).
- Run it on your existing media library to compress all past uploads.
- Configure automatic compression for new uploads.
3. Serve images in modern formats:
- If your plugin offers WebP conversion, enable it—WebP is 25–35% smaller than JPEG.
- Most visitors' browsers now support it.

Minify CSS and JavaScript

Minification removes unnecessary characters (spaces, comments) from code files, reducing their size.

  1. Use your caching plugin: Most caching plugins include minification options—enable CSS and JavaScript minification in the settings.
  2. Test after enabling: Minification rarely breaks sites, but always verify your site still looks and functions correctly.
  3. Defer non-critical JavaScript: In your caching plugin settings, enable "defer JavaScript"—this lets your page render first before loading JavaScript that isn't needed immediately.

Delete Unused Plugins and Themes

Every plugin and theme adds code that WordPress must load. Deactivate and delete anything you're not using.

  1. Go to Plugins and delete deactivated plugins.
  2. Go to Appearance > Themes and delete inactive themes.
  3. Keep only the plugins and theme you actually use.

Limit Revisions and Trash

WordPress stores multiple revisions of each post/page by default, and keeps deleted items in trash. These accumulate and bloat your database.

1. Open wp-config.php via FTP or your control panel's File Manager.
2. Add these lines (before "That's all, stop editing!"):
```php
define( 'WPPOSTREVISIONS', 3 );
define( 'EMPTYTRASHDAYS', 7 );
```
3. This keeps only 3 revisions per post and auto-deletes trash after 7 days.
4. Empty existing trash and old revisions with a plugin like WP-Optimize or Clicky.

Use a Content Delivery Network (CDN)

A CDN stores copies of your site's static files (images, CSS, JavaScript) on servers around the world, so visitors download from a server near them.

  1. Popular free CDN: Cloudflare offers a free plan that's very effective.
  2. Set up via your control panel: Many hosts integrate Cloudflare with a single click in their dashboard.
  3. Alternatively, use a WordPress CDN plugin: Bunny CDN, Amazon CloudFront, or others integrate directly into WordPress.

Optimize Your Database

Over time, WordPress databases accumulate spam comments, old revisions, and orphaned data.

1. Install WP-Optimize or similar plugin:
- Go to Plugins > Add New, search "WP-Optimize," and activate.
- Go to its settings page and click "Run Optimization."
- This removes post revisions, trashed items, spam, and orphaned data.
2. Schedule regular cleanups: Enable automatic weekly or monthly optimization.

Enable Gzip Compression

Gzip compresses your site's HTML, CSS, and JavaScript files before sending them to visitors' browsers, reducing file size by 50–70%.

  1. Check if your host has enabled it: Many hosts enable Gzip by default.
  2. If not enabled, ask your hosting provider to enable Gzip compression on your server.
  3. Verify it's working: Use an online tool like GIDNetwork Gzip Test to confirm Gzip is active.

Reduce External Requests

Every external script (Google Fonts, analytics, ads) adds a network request. Reducing these speeds up your page.

  1. Audit your plugins: Some plugins load unnecessary external files—check their settings.
  2. Remove unused third-party code: If you installed a tracking script or embed that you no longer use, remove it from your site header/footer.
  3. Lazy-load videos and embeds: If your theme or a plugin supports lazy-loading, enable it so videos only load when visitors scroll to them.

Upgrade Your Hosting

If your site is still slow after optimization, your hosting plan may be insufficient.

  • Check your resource usage in your control panel—if CPU or memory are constantly maxed, upgrading to a better plan will help.
  • Consider managed WordPress hosting if available; these plans are tuned specifically for WordPress performance.

Monitor Performance

After making changes, verify they actually improved speed.

  1. Use Google PageSpeed Insights (pagespeed.web.dev)—enter your site URL and get a detailed performance report with suggestions.
  2. Use GTmetrix (gtmetrix.com) for detailed waterfall charts showing which elements load slowly.
  3. Test before and after each major change to see the impact.

A faster site keeps visitors engaged and improves your search ranking. Start with caching and image optimization—these two changes alone typically cut load times in half.


Was this article helpful?

← Back to WordPress