How to Speed Up WordPress to Load Under 1 Second

How to make WordPress load faster

WordPress is a great CMS (content management system) for building your website, but it is slow and getting it to load faster is always problematic for webmasters. Speed is important for every website and faster websites ranking better on Google and have higher conversion rates from visitors. If you’re using WordPress, there are a number of factors that can affect the speed of your website. We’ll cover all of these in this guide and show you the fastest and easiest way to make WordPress load super fast! Let’s get started!

Did You Know?
Studies have proven that the average website has less than 2 seconds to load in order to capture the attention of a potential customer.

Make WordPress Faster in 9 Proven Steps for Google Pagespeed Tests

There’s a few ways to test the speed of your website so that we can get quantifiable numbers. Pingdom only tests for onload page time, which is the amount of time to fully load all of the images, HTML, CSS, & JavaScript files on a fiber connection. Some embedded scripts will make requests to other websites for files that Pingdom does not take into consideration for testing purposes, but sites like GTmetrix do. GTmetrix has an option not only for testing “fully loaded” page times but also for connection throttling to simulate different internet connections like Cable, DSL, 3G mobile, 2G mobile, and 56K dial-up. While both have their pros and cons (you can read the full differences here), we used a combination of Pingdom & GTmetrix, while also taking some Google Pagespeed factors in account, to evaluate the different speed benchmarks.

As a general rule, server-side web caching using Nginx & Varnish Cache will outperform WordPress plugin utilities, while integration with a CDN service is required to procure the fastest download times for web pages to every international geolocation. Page caching plugins need to be integrated with Nginx, Varnish Cache, & the CDN services in order to be most effective, otherwise they can be counter-productive. Although there are many technical tweaks and web page optimizations you can make, the physical server and data center your WordPress site is hosted on makes the most significant difference in page load speed performance times.

Therefore, if you really intend on getting serious about your website’s page load speeds, you need to pick the right web host from the start or spend the time testing, analyzing, & benchmarking the different services while migrating through multiple hosting plans. Afterwards, you can use third-party WordPress plugin utilities and CDN integration to make the site run even faster, making sure to improve image file compression across the board.

Quick Tip
The physical server and data center your WordPress site is hosted on makes the most significant difference in optimizing page load speeds for better performance.

Step 1: Choose a High-Performance Fully Managed WordPress Web Host

Web hosting is the #1 speed factor and the foundation for any website. Choosing the right WordPress web hosting provider is the most important aspect to making WordPress run as fast as possible.

Web hosting performance depends on the web server hardware, data center, operating system, software stack, caching software, etc. in use on the platform. Speed benchmarks are a valid way to distinguish between the various web hosting data center performance standards, so in order to establish a test for WordPress hosting, we signed up for an account with each of the top WordPress web hosts and setup a new, identical WordPress installation on each account.

This test more accurately reflects the load times of an average page published through WordPress for advanced sites running on shared hosting platforms at major web hosting companies.

From these companies, we identified 5 advanced web hosting caching systems for further evaluation:

  1. InMotion Hosting’s Managed WordPress Plans
  2. A2 Hosting’s Turbo Cache Optimized Plans
  3. WP Engine’s Managed WordPress Platform
  4. Siteground’s SuperCacher Module Plans
  5. HostGator’s WordPress Cloud Hosting Plans

The web host can make a critical difference in WordPress page load speeds, which is why we spend so much time & effort on BWHP reviewing the various web hosting companies and putting their data center hardware through independent benchmarking tests.

Web Hosting Company:Pingdom Load Speed:GT Metrix Load Speed:
InMotion Hosting’s Managed WordPress Plans480ms500ms
A2 Hosting’s Turbo Cache Optimized Plans450ms590ms
WP Engine’s Managed WordPress Platform510ms500ms
SiteGround’s SuperCacher Module Plans600ms640ms
HostGator’s WordPress Cloud Hosting Plans530ms600ms

Any of the above web host’s managed WordPress web hosting plans would be a solid choice. We personally would recommend InMotion Hosting.

Step 2: Use NGINX & Varnish Cache Servers

Many experts have attempted to reverse engineer the web server stack composition found on WordPress optimized hosting platforms like WPengine, Bluehost, and others to find that the best options for high traffic website support includes the use of NGINX and Varnish Cache. NGINX is a reverse-proxy server that replaces Apache with better load balancing and page caching for network traffic to a data center. Varnish Cache is a proprietary web page caching system that has been tested to speed up the delivery of web pages an astounding 300 to 1000 times over normal operations. Both of these solutions are highly implemented by the most popular WordPress sites on the web that scale to support millions of page hits per day. Web hosting companies have used NGINX & Varnish Cache to build managed WordPress and cloud hosting platforms to make the technology available pre-configured to smaller website publishers at cheaper rates. The same solution can also be built on VPS & dedicated servers for ecommerce & blog sites that need to optimize to support high rates of web traffic on hardware resources, but it is often cheaper and more effective to go with a Platform-as-a-Service (PaaS) plan where the servers are pre-configured, managed daily by experts, and tested for high scale support of production websites.

Step 3: Make Sure to Use PHP 7.1, Memcached, & HHVM

Another important recommendation for all WordPress website owners is to use PHP 7 or greater. PHP 7 was released in December of 2015, but most shared web hosting plans still keep their default configuration at PHP 5.6. This can easily be changed in cPanel with different settings for every domain. Ultimately PHP 7 is about 2 to 3x faster thanks to the its new Zend Engine 3.0. It can also handle 3x as many requests per second, which is a big performance boost. Make sure your host has PHP 7.1 or greater enabled or check the settings and update the configuration manually.

HHVM (Hip Hop Virtual Machine) was developed by Facebook to improve PHP processing times for websites, replacing the Zend Engine with a “Just-in-Time” (JIT) compiler. Some web hosts include HHVM with premium plans, while others charge extra for it as an account add-on. Using PHP 7.1 & HHVM together is recommended to get the best performance speeds for WordPress websites with many registered users active online at the same time, i.e. BuddyPress, ecommerce sites, & social networks. Other PHP caching options to implement are Memcached, OPcache, and APC to avoid the stress of repeated process functions on a web server.

Step 4: Install WP Rocket, an Advanced Page Caching Plugin

WP Rocket is a premium page caching plugin for WordPress. It costs $39 a year for one website. There are numerous caching plugins available on WordPress, but WP Rocket is one of the fastest and easiest to use.

WP Rocket plugin screenshot

Quick Note
WP Rocket has page caching, HTML/CSS/JavaScript minification, preloading, browser caching, DNS prefetching, GZIP compression, database optimization, Google Fonts support, Lazyload, & CloudFlare CDN compatibility features available for website publishing, as well as the ability to defer JS loading & remove query strings from static resources, making it one of the most robust caching suite options for WordPress. The price is $39 per year for one website, $99 per year for 3 websites, and $199 per year for unlimited websites.

Step 5: Minify Website HTML, CSS, & JavaScript

Even optimized WordPress web hosting platforms will still need to be installed with additional CMS plugins to minify HTML, CSS, & JavaScript files for better page load speeds. There are a wide number of competing plugins, both free and subscription based, that are available to do this for WordPress. W3 Total Cache, WP Super Minify, Autoptimize, Better WordPress Minify, Breeze, WP Fastest Cache, and Fast Velocity Minify are all popular choices, but we recommend going with WP Rocket from the step above. Some of the minification plugins offer a full suite of compression utilities along with advanced page caching configuration features, while others are lighter weight and just focus on the single task. The more advanced options include paid licensing requirements that can be more expensive than a year of web hosting costs, while doing the same service as the free options. Breeze has just 3 checkboxes required to turn on HTML, CSS, & JavaScript minification and also integrates WordPress with CDN services. W3 Total Cache has 16 pages of settings for power users, allowing for complete control of advanced caching configuration for WordPress. It is worth the time to experiment and find the plugin that works best for you, but most of these tools have overlapping functionality and can be used interchangeably.

Step 6: Leverage Browser Caching on Web Pages

In order to leverage browser caching, you need to establish content expiration dates for the browser to recognize by adding Cache-Control Headers and ETags to the HTTP header of every web page output by WordPress. This can be done by adding code to the .htaccess file on Apache servers or to the .conf file if running Nginx. Alternatively, and more easily, this can be done through one of the caching suite plugins like WP Rocket, W3 Total Cache, or WP Fastest Cache. There are also more simple plugins like Browser Caching that can be installed for free just to accomplish these changes. Without specifically setting the expiration date for files cached by user browsers, your WordPress site will continually be flagged for this issue in Google Pagespeed tests. When files are stored locally in a user’s web browser, they do not need to be downloaded again on every page load, making the website run faster in practice.

Step 7: Store Remote JavaScript Files Locally

Another common issue arising with Google Pagespeed tests is the recommendation to store remote JavaScript files locally. For example, if you are using Google Analytics, social media recommendation widgets, or cloud fonts, the code for the web page will include script tags which instructs the user browser to retrieve these files from a remote server. By downloading and storing the remote JavaScript files on a local server, i.e. the same one serving the other files for the web page, the page load speed will improve without the explicit reliance on a third-party resource which may be slow to connect and download for a variety of reasons. The Cache External Scripts plugin will solve this problem, while WP Rocket includes the ability to change the location of the script tag in the template order or to load the JavaScript files asynchronously. Depending on the configuration of your website, it may take some experimentation and testing to get these settings corrected. Most of the WordPress plugin solutions like WP Rocket will check for file changes and download a fresh copy of the remote files every few hours automatically.

Step 8: Use WP Smush It to Optimize & LazyLoad Images on Pages

Graphic designers commonly edit and save .jpg & .png images in Photoshop using the “Save for Web” settings, but this does not specifically compress the files for page speed optimization. Since the resultant output images files can be fairly large in size, you’ll need to further compress them to pass the Google Pagespeed tests. As mentioned above the EWWW Image Optimizer plugin will do this and WP Smush It is also highly recommended. Basically, you have the option to compress every image manually using a desktop software program like Riot, or install a WordPress plugin that will do the same according to established settings on the fly with every page load. Doing the compression manually allows for greater control on image quality, but takes more time.

Another good practice is to “lazyload” images so that they only appear when they fall within the viewpoint of the browser to the user. If you have a long page with a lot of content above the image, the file won’t be loaded until the user scrolls down to the spot in the page where the image is embedded. This mechanism reduces the number of HTTP requests and improves the page load time for the user.

Step 9: Integrate a CDN Service for Better Web Page Caching

In order to secure speeds regularly in the 250 ms to 300 ms range for all page loads using WordPress, you will need to integrate with the services of a CDN or Content Delivery Network. Most CDN services require the transfer of a domain’s DNS settings to their network so that the servers on a hosting account are only being used by registered users and to output web pages for cached use. The CDN will make multiple copies of all the pages on a website and then transfer them to a network of servers located in different data centers around the world. CDNs will analyze where a web traffic request appears from geographically and then route the request to servers in a data center that are most near to the point of origin. This system cuts down on the time needed to transfer files and requests across the fiber network. CloudFlare is the most well known CDN service at this time primarily because of its free plan offered on many shared hosting accounts with cPanel integration, while MaxCDN, KeyCDN, & CDN77 are also popular with WordPress plugin support. Most free CDN offers are time limited or bandwidth limited, and high traffic website owners generally prefer an IT major like Google, Rackspace, AWS, or DreamHost for better reliability at scale for paid services. Some telecom companies and web start-ups also offer CDN services at competitive rates.

Conclusion

If you need first page Google SERP ranking, then your website will need to focus on optimizing performance to load every page to anonymous users as quickly as possible using caching. Google Pagespeed tests for both desktop and mobile performance, providing a number of tips on what website owners can do to improve their results. Outside of the choice of a superior web hosting plan, publishers need to focus on minifying HTML, JavaScript, & CSS files through compression utilities, enabling browser-based caching through page header settings in the CMS, reducing the size of embedded image files, and eliminating render-blocking JavaScript/CSS in above-the-fold content.

For any online business, it is crucial to take the time needed to maximize your website efficiency. Otherwise, you might end up losing customers. Just one extra second of load time makes all the difference and can cost you hundreds (or even thousands) of dollars in lost revenue. The Google search engine algorithms have been changed to evaluate and represent page load speed on mobile/desktop devices as part of their ranking system. This means that how your website performs for users in page load speed will also affect the position of a web page in the search engine result page hierarchy.