10 Steps for Optimizing WordPress Site Performance

Share this article

10 Steps for Optimizing WordPress Site Performance

This article on WordPress site performance is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible.

You don’t want a slow website. Potential visitors may leave before your page even finishes loading. And you’ll be penalized in search results, meaning even less traffic.

You want your web pages to load in two seconds or less. How do you achieve that? One step at a time.

In this article, we cover a list of items you can optimize to speed up your WordPress site.

Just How Slow Is My Site?

Your site may not feel slow to you. Most likely your browser has already cached it, so you won’t be experiencing it the same way as a new visitor.

Here are some services that will inform you how long your page takes to load and tell you the overall file size of your page:

Check the speed of your sites before and after tweaking them for performance. If you can get your pages loading in two seconds, you’re doing well.

Keep a record of how much difference each step you take makes. What made the most difference?

#1. Choose a Good Web Host

It’s impossible to speed up a website that’s being hosted on a slow server. Choosing the right hosting provider is the first important step towards having a fast-loading website.

How do you choose a company that makes speed a priority? Check out our Performance Checklist in The Ultimate Guide to Choosing a Hosting Provider.

SitePoint recently partnered with SiteGround as our official recommended host. With servers on multiple continents and the use of the latest SSD hardware, an in-house caching tool, and a free CDN service, SiteGround provides and invests heavily in speed acceleration. Their flexible servers support PHP7 and HTTP/2 and they have ongoing software and hardware updates.

#2. Optimize Your Theme

First, use a fast theme. Themes with a lot of options make your job easier, but at the expense of making the web server and browser work harder. Some WordPress themes are megabytes in size, adding seconds to your page loading time.

Every feature you don’t use slows your site down for no reason. If you’re comfortable tweaking code, choose a theme with fewer options to speed up your site.

  • The default WordPress themes are easy to tweak, lightweight, and well-coded. Consider using one and either tweaking the code yourself, or hiring a developer.
  • Thesis and Schema are two more themes that prioritize performance.

Further reading:

Second, use a responsive design. These load less resources for mobile devices, or specify high-res images for desktop displays. Mobile users don’t have to download huge images, while desktop users don’t have to squint at tiny ones.

Responsive sites are also preferred by Google, so expect a slight boost in SEO once you switch.

#3. Monitor Your Plugins

First, minimize the number of plugins you use. Before you install any plugin, ask if it’s really necessary. Having a large number of plugins installed won’t make a huge difference to the speed of your site, but it increases the risk of installing badly behaved plugins.

Second, make sure your plugins are optimized for the current version of WordPress. Perform some research before installing a plugin, especially if it’s rated three stars or less. It may be poorly developed, or use inappropriate hooks. This will slow down your site, and may also adversely affect WordPress and your other plugins. It’s also important to keep plugins updated to ensure you have the latest performance improvements, security patches, and features.

#4. Optimize Your Widgets

Your widgets should be as light and easy to load as possible. Some load external JavaScript or CSS while being rendered. This is common for social network widgets for Facebook, Twitter and Google+.

If a widget is unlikely to be updated often, upload it directly to your server. By not having to rely on external servers, you’ll improve your site’s loading time.

#5. Optimize Your Static Content

First, compress static content with gzip. Compressed files are smaller, so will obviously load faster.

  1. The best option is to enable gzip compression straight from cPanel (if your host offers you that) if you’re on a shared server.
  2. You can enable gzip compression using a plugin like W3 Total Cache. We’ll cover plugins in our next article.

Second, take the load off your web server with a CDN. Your static resources (like images, scripts and CSS files) will be served from optimized content delivery network servers all over the world — generally the closest server to your visitor. And your web server will be freed up to serve the rest of your site, improving performance.

Ideally, look for a web host that offers a CDN in its hosting plans, like SiteGround. There are also lots of CDN networks out there:

These work with the caching plugins we’ll cover next time.

Here’s some further reading about CloudFront:

#6. Optimize Your Images

Images are one of the heavier elements of your site: they make up over 65% of web content. There are a few ways you can optimize your uploaded images.

First, specify maximum image dimensions for thumbnail, medium, and large sized images. You’ll find these options in Settings/Media. If you upload a 1024px image and your content area is only 604px wide, the image will be scaled down using CSS. The resulting pre-resized, 604px wide image will be significantly smaller to download.

Second, smush it! This technique reduces image file sizes losslessly, without resizing them or downgrading their quality. While Yahoo killed the Smush.it service a few years ago, there are alternatives like reSmush.it, and a number of plugins which we’ll cover in the next article.

Third, employ lazy loading. This technique is effective for image-heavy sites. Images are only loaded when they become visible, not when the page is initially loaded. This can speed up page load times dramatically, though there will be a delay when displaying images when they scroll into view.

Further reading:

Fourth, choose the best image format for your website. Some image formats are easier to work with, while others are smaller. For example, scalable SVGs have smaller file sizes, especially if you optimize them for the web and compress them with gzip.

Learn the pros and cons of a variety of image formats here:

Fifth, use CSS sprites. Performance is improved by combining lots of small theme and miscellaneous images into as few images as possible. Learn more here:

Finally, check out this comprehensive overview of optimizing images:

#7. Optimize Your Database

WordPress pages load from a MySQL database. Over time, the database may contain a lot of information you no longer need. Optimizing your database removes this information and improves performance.

You can optimize your database directly from phpMyAdmin. You can also optimize it with plugins. We’ll cover these in our next article.

#8. Speed High-traffic Sites with Caching

Caching is very effective at optimizing high-traffic sites. Every time a WordPress page is loaded, information is retrieved from your database and CSS files, and is combined into a HTML file which can be loaded into the visitor’s browser. This takes time.

Caching keeps those HTML files available for future visitors, saving significant time. We’ll cover caching plugins in our next article.

#9. Perform Routine WordPress Maintenance

Keep your WordPress site in tip-top shape by regularly maintaining it. Some maintenance routines can significantly speed things up, in particular:

  • Keep WordPress and your plugins up to date.
  • Delete old post revisions.
  • Delete spam comments.

Learn how to do these and much more here:

#10. Use Performance Plugins

For many optimization tasks, there are WordPress plugins that will take care of the heavy lifting for you. We’ve covered eight of the best plugins that cover all the bases. We’ve also listed almost two dozen alternatives so you can explore which best suit your needs. Dive in and see what makes the most difference to your site.

If you’re following our WordPress Maintenance Checklist you’ll probably already be using some of these plugins. Keep it up! That cruft will continue to accumulate.

W3 Total Cache

  • Cost: free
  • Active installs: 1+ million

This plugin provides Easy Web Performance Optimization (WPO) using caching—caching of posts and pages to memory or disk, caching of feeds, search result pages, database objects and minified CSS and Javascript files. To get the most out of it, spend some time configuring it carefully.

W3 Total Cache can also work with your CDN (like Cloudflare or MaxCDN) to further improve load times.

W3 Total Cache improves the SEO and user experience of your site by increasing website performance, reducing download times via features like content delivery network (CDN) integration.

Alternative caching plugins include WP Super Cache, Hyper Cache, WP Fastest Cache and Cache Enabler.

If you prefer to avoid using plugins, a good option for you would be to look for a hosting provider that will do the caching for you. Our partner SiteGround has a great caching tool, developed in-house, that can help you drastically boost your website speed.


  • Cost: free
  • Active installs: 600,000+

This free plugin will optimize your WordPress database with the click of a button, or automatically with its built-in scheduler. Redundant information like spam comments, post revisions and other trash items will be cleaned from your mySQL database, speeding up how quickly your site loads.

WP-Optimize is an effective tool for automatically cleaning your WordPress database so that it runs at maximum efficiency.

Alternative database optimization plugins include Optimize Database after Deleting Revisions, WP Cleanup, WPOptimize, WP Database Cleaner and WP-DBManager.


  • Cost: free
  • Active installs: 300,000+

Poorly structured CSS and HTML will result in a slow site and lost traffic. This plugin scans and tweaks your site, “minifying” and removing redundant code.

To prevent compatibility conflicts, Autoptimize can ignore your other plugins. It can also force your plugins to run in a specific order. By experimenting with this, you might be able to drastically improve your loading times.

Autoptimize makes optimizing your site really easy. It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head and can move scripts to the footer.

Alternative plugins that minify include WP Super Minify and Better WordPress Minify.

P3 (Plugin Performance Profiler)

  • Cost: free
  • Active installs: 100,000+

Bad plugins can adversely affect the performance of your site. P3 will evaluate yours. It will identify the plugins that have the biggest impact on your site’s load time, and display them in a pie chart so you can easily see which tweaks will make the most difference.

This plugin creates a profile of your WordPress site’s plugins’ performance by measuring their impact on your site’s load time.  Often times, WordPress sites load slowly because of poorly configured plugins or because there are so many of them. By using the P3 plugin, you can narrow down anything causing slowness on your site.

Alternative plugin-related plugins include Plugin Organizer.

WP Smush

  • Cost: free and premium from $19/month
  • Active installs: 700,000+

This plugin compresses images by stripping metadata from JPEG files, optimizing JPEG compression, converting certain GIFs to indexed PNGs and stripping the unused colors from indexed images. You can set it up to automatically compress new images when they’re uploaded to your site.

WP Smush is fast, and performs well. Files are compressed using dedicated servers, and it’s recommended by the site performance tool GTmetrix.com.

Resize, optimize and compress all of your images with the, incredibly powerful and 100% free WordPress image smusher, brought to you by the superteam at WPMU DEV!

Alternative image compression plugins include EWWW Image Optimizer, Imagify, Kraken Image Optimizer, ShortPixel Image Optimizer and CW Image Optimizer.

Lazy Load

  • Cost: free
  • Active installs: 90,000+

This plugin makes sure images are loaded only when they are visible above fold. It doesn’t require configuration and works out of the box.

Lazy load images to improve page load times. Uses jQuery.sonar to only load an image when it’s visible in the viewport.

Alternative lazy load plugins include jQuery Image Lazy Load WP, BJ Lazy Load, Rocket Lazy Load, Unveil Lazy Load and Lazy Load for Videos.


  • Cost: free
  • Active installs: 100,000+

Rather than offering lossless compression, this free plugin automatically resizes images to a more “sane” resolution. It’s able to set a maximum width, height and quality of images, and can convert BMP files to JPG.

Imsanity automatically resizes huge image uploads down to a size that is more reasonable for display in browser, yet still more than large enough for typical website use. The plugin is configurable with a max width, height and quality.

WP HTTP Compression

  • Cost: free
  • Active installs: 5,000+

This plugin compresses your pages in the gzip format (if the browser supports compressed pages). HTTP compression can reduce the size of your pages by 60–80%, allowing pages to load three or four times faster.

This plugin allows your WordPress blog to output pages compressed in gzip format if a browser supports compression.

You can also enable gzip compression from W3 Total Cache mentioned above, or in the settings of your web host’s control panel.

#11. Further Tips

  • Empty your trash. There can be a lot of trash in your database that will slow your site’s performance. By default, WordPress automatically deletes trash after thirty days. You can empty the trash manually from your dashboard, and we’ll share some helpful plugins in our next article.
  • Minify your JavaScript and CSS files by removing all unnecessary data. CSS Minifier lists some tools that will help you do this.
  • Turn off trackbacks and pingbacks. These use server and database resources every time someone mentions your site. Turning the setting off (from WordPress’ Discussion settings) won’t destroy the backlinks, just the work that is generated.

Have a Go!

How slow is your site? Use one of the tools listed above to find out. Then try one or more strategies and test your speed again. Then repeat.

SiteGround, our preferred hosting provider, allows you to use powerful performance optimization techniques with just a few clicks. Their guide to improving WordPress performance includes full tutorials on many of the topics we’ve covered in this article, including caching, gzip compression, using a CDN, optimizing images, and optimizing the WordPress database.

Which optimization strategy made the most difference on your website? Let us know in the comments.

Frequently Asked Questions on Optimizing WordPress Site Performance

What are the best plugins to optimize WordPress site performance?

There are several plugins available that can significantly improve your WordPress site’s performance. Some of the best include WP Rocket, a premium plugin that offers a range of optimization features such as caching, database optimization, and lazy loading. W3 Total Cache is another popular choice, offering features like page cache, database cache, object cache, and browser cache. Other notable plugins include WP Super Cache, Autoptimize, and WP Smush for image optimization.

How does a CDN improve WordPress site performance?

A Content Delivery Network (CDN) can significantly improve your WordPress site’s performance by storing a cached version of your site on multiple servers around the world. When a user visits your site, the CDN delivers the site from the server closest to them, reducing the time it takes for the data to travel and thus speeding up your site.

How can I optimize my WordPress database for better performance?

Optimizing your WordPress database can significantly improve your site’s performance. This can be done by regularly cleaning up your database, removing unnecessary data, and optimizing your database tables. Plugins like WP-Optimize and WP-Sweep can help automate this process.

How does image optimization improve WordPress site performance?

Large, unoptimized images can significantly slow down your WordPress site. By optimizing your images, you can reduce their file size without losing quality, resulting in faster page load times. This can be done using plugins like WP Smush or EWWW Image Optimizer.

How can I use caching to improve WordPress site performance?

Caching can significantly improve your WordPress site’s performance by storing a static version of your site, reducing the number of requests to your server and thus speeding up your site. This can be done using plugins like W3 Total Cache or WP Super Cache.

How does minifying CSS and JavaScript improve WordPress site performance?

Minifying your CSS and JavaScript files can improve your WordPress site’s performance by reducing the size of your files and thus the amount of data that needs to be downloaded when a user visits your site. This can be done using plugins like Autoptimize or WP Rocket.

How can I optimize my WordPress site for mobile devices?

Optimizing your WordPress site for mobile devices is crucial for performance and SEO. This can be done by using a responsive theme, optimizing images, enabling AMP (Accelerated Mobile Pages), and using a mobile-friendly plugin.

How does a good hosting provider improve WordPress site performance?

A good hosting provider can significantly improve your WordPress site’s performance by providing fast server speeds, reliable uptime, and excellent customer support. Some popular WordPress-friendly hosting providers include SiteGround, Bluehost, and WP Engine.

How can I monitor my WordPress site’s performance?

Monitoring your WordPress site’s performance is crucial for identifying any issues and making necessary improvements. This can be done using tools like Google PageSpeed Insights, GTmetrix, and Pingdom.

How does regular updates improve WordPress site performance?

Regularly updating your WordPress site, including your theme, plugins, and core WordPress software, can improve your site’s performance by ensuring you have the latest features, bug fixes, and security updates. It’s also important to test any updates on a staging site before applying them to your live site to avoid any potential issues.

Adrian TryAdrian Try
View Author

Adrian Try is an Aussie writer, musician, cyclist, and tech geek.

hostinglearn-WordPressperformancesitegroundunderstanding-performanceweb hostingWordPress-hub
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form