One of the most common request we get at WP Allied is “Can you make my site faster?”. Website speed is important for a variety of reasons. Here are 3 key reasons:
- A faster site means Google will love you.
- A faster site will increase your conversions.
- A faster site will provide a better experience for your customers and visitors, now people will love to visit your site!.
Today, we are going to give you a handful of tips to get your site running fast:
First things first. There is not tip or guide that will work if you are hosting your site with a subpar web hosting. Generally speaking, we ask customers to move away from all EIG-owned hosting companies (Bluehost, Hostgator, iPage) and GoDaddy to mention a few. The reason is because they overcrowd their servers and also run outdated software.
If you want to know if your host is an issue, you may want to measure the TTFB (time to first byte). To put it simply, this is a measurement of how long the browser has to wait before receiving its first byte of data from the server.
Here are 2 easy tools you can use to measure your TTFB:
Google PageSpeed Insights
A quick way is to enter your domain into Google PageSpeed Insights and if one of the issues raised is “Reduce server response times (TTFB)” then you can get a big win from hosting with a fast host.
Pingdom Speed Test
Another way is to use Pingdom Tools. In Pingdom it is actually referred to as “Wait” time.
What is the ideal TTFB?
- Under 100ms is excellent.
- 200ms is good.
- 300-500ms is acceptable.
- 600ms and above it might be time to upgrade to a better web stack.
Which WordPress hosting companies are you loving now?
Siteground is the best WordPress hosting for people just starting out. Siteground offers reasonably low prices with respectable performance and uptime and customer service within acceptable ranges.
Flywheel is the best WordPress hosting for most people (individuals and small and medium businesses). Flywheel has outstanding performance and uptime and solid customer support.
WP Engine is the best WordPress hosting for developers. WP Engine has a robust set of developer tools, a good performance and uptime and phenomenal customer support.
A common reason for sites being slow is because of the size of all of the elements that make up the site (images, audios, videos and scripts). The Pingdom Speed Test and GTmetrix tool can tell you how big your site is.
What is the ideal site size?
Here are some rough, subjective guidelines around the size of the site:
- Under 500kb is excellent.
- Under 1mb is good.
- 1-3mb is acceptable.
- 3mb and above requires action.
The culprit for a large site is often caused by a page builder. There are a few page builders out there that can seriously destroy your page load times, lock-in your content with shortcodes, and just generally make a mess out of your website.If you’re looking for a way to build more advanced page layouts than most themes allow, We think BeaverBuilder will definitely meet your needs.
Another culprit is large images. The quick way to find images that need to be optimized is to use the Pingdom Speed Test tool. After you run the test, click the “Sort by” drop down and choose “Response Total Size” and uncheck the “Rising” option. If you have images in here that are over 100kb then you can take action on those images.
Here are a few tips for optimizing images:
- Optimize all images before you load them into your WordPress site. As a general rule, We like all images to be well under 100kb. Use an image compression tool like ShortPixel to optimize your images.
- Use the exact required size for images. For example, if your theme shows featured images at 300px wide, make sure you create them at exactly that size.
- Use the correct image mime type. If the image doesn’t have transparency, use the JPG format.
WordPress Options Table Size
Site performance can be negatively affected by a large options table. This table can become bloated quite quickly. We often see wp_options become huge due to:
- Plugins installed on large sites that were designed for smaller sites. These plugins often store data in wp_options rather than their own custom tables.
- A bug in a well-designed plugin, like this issue found with Yoast’s SEO plugin.
Caching plugins can also be negatively affected by a large wp_options table. Popular caching plugins place a storage limit on individual values stored in cache. A large options table can easily exceed this limit, preventing it from being cached and severely slowing your site.
The simplest way to avoid the pitfalls of a large wp_options table is to keep it small – we recommend keeping this database table under 500 rows. This requires monitoring to ensure that newly installed or updated plugins or themes don’t diverge from best practices and start storing data within wp_options.
Plugins will be a common reason behind a lot of WordPress problems. Because plugins are written by different developers with varying skills, you need to be careful what you install and how many you install.
Remove any plugins you don’t need
Remove any inactive or active plugins that you don’t need. Here are the plugins we recommend to remove and the reasons for removal:
- Security plugins: We recommend using a service that block hacks and malicious request at the DNS level. Why? Simple, security plugins has impact in your server performance.
- Using plugins that perform more than 1 function instead of 2 plugins. For example using WordPress SEO from Yoast as the SEO plugin and for site maps. We see a lot of clients with 2 separate plugins not realizing that YOAST already creates site maps.
- Performing other functions outside of WordPress. For examples analytics or broken link checkers can all be done outside of WordPress.
- Disabling plugins you only use from time to time. For example the WordPress importer is a common one. If you aren’t using the plugin regularly, you can remove it and add it later when you need it.
- Re-direct plugins with lots of redirects. They can dramatically slow down the speed of the site.
Plugins can have a huge impact on your site speed so be careful about what you install.
Reducing external scripts
Another common cause for slow WordPress sites, is the existence of too many external scripts. Having Facebook like buttons, Facebook comments, Twitter share count buttons, Youtube videos, live chats, pop-up scripts, opt in forms or analytics services like Google Analytics are some common examples of external scripts that can have a big impact on the load time. Once you load from other sites, it limits your options in terms of how you can treat that script.
There are a couple of ways you can improve the loading of these scripts.Simply deciding that you can live without certain features is sometimes all it takes to get a significant boost in speed.
To work out which scripts are particularly big, you can use the same approach above with the Pingdom Speed Tool and filter by “Response Total Size”. From there you might decide you can live without some of them or make them load later (more on this later).
We left site caching as the last step because it should be set up only after everything above is optimized. Using caching first is only a band-aid fix that only decreases page weight and database queries on the cached files of your site instead of the site itself.
How WordPress renders each page
Every page visited on your WordPress site requires a request to the server, processing by that server (including database queries), and then a final result sent from the server to the user’s browser. Since the server has to process all of those requests, it takes some time for the complete page to be delivered to the user. That’s where a WordPress caching comes into play!
Types of Caching
When it comes to types of caching, there are two different approaches commonly used:
- Caching with a Plugin
- Caching at the Server-Level
Caching with a Plugin
WordPress caching plugins save static files of your WordPress pages and reroute web visitors to those static versions. They rely on WordPress and its underlying PHP engine to generate the static files. This works at the small scale, but suffers when WordPress itself starts to choke on big traffic.
Based on our experience, we recommend the following plugins:
- WP Super Cache (free)
- WP Rocket (premium)
Caching at the Server Level
Caching at the server-level is by far one of the easiest approaches for the end-user. What this means is that the server keeps the cached page data in its RAM memory. This is what most Managed WordPress hosting providers offer and the one we recommend.
Too much “baggage”
There’s no real quick fix to the performance issues other than to regularly keep an eye on your site and clean it out. If you’re not sure how to do it yourself, it’s probably best to find a developer to do it for you. A few improvements could be:
- Changing Database Engine from MyISAM to InnoDB. Over recent years, InnoDB has shown to perform better and be more reliable.
- Remove Page and Post Revisions.
- Removing any spam comments or trackbacks that you don’t need.
- Offload your media files like images, audios, videos and PDF externally on Amazon S3.
- Deliver your media files via a CDN. CDN’s like MaxCDN or Cloudflare can serve your images quicker.
- Loading scripts asynchronously. This means the page will load before the script has to load in. If it’s not something that is needed right away this can be a great idea. We do this for video, iframe and live chat scripts for example.
Summarizing WordPress speed
You can really go deep on speeding up your WordPress site. You could probably spend weeks fine tuning all of the elements and getting it perfect. But for most people, there are a few major reasons why their site is running slow. And if you don’t deal with these issues, the fine tuning is a waste of time.
- Quality of your host.
- Physical size of the site, generally due to images.
- Quality of the plugins used.
- Number of external scripts running on the site.
If you have any questions about WordPress speed, please reply in the comments below. If you are interested in support with your WordPress site check out our Site Care plans.