Translate

Wednesday 3 October 2018

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:

The post 10 Steps for Optimizing WordPress Site Performance appeared first on SitePoint.



No comments:

Post a Comment