Head-to-Head Performance Comparison of Nginx and Apache
Discover the comprehensive comparison between Nginx and Apache’s performance. Real-life use cases, optimization strategies & server selection guide included.

Google has gradually been increasing the importance of site speed as a ranking signal since mobile-first indexing was introduced in 2016. In their own words, โSpeed equals revenue.โ
When a page takes too long to load, visitors move on to another page to find answers quicker. Slow speed discourages visitors from staying on your site, irrespective of how theyโve found you (organic search, referral link, paid ads).
In addition to improving the user experience (UX) of your site, a fast site also improves overall SEO.
If your website is fast, you have a greater chance of ranking higher than slower sites with high bounce rates.

A Backlinko study that analyzed 11.8 million Google search results found, quite surprisingly, that there was โno correlation between page loading speed and first page Google rankings.โ It did explain that Googleโs Speed Update affects only extremely slow pages and downranks them instead of benefiting fast pages.
However, the study found that the average page loading speed for results on the first page is 1.65 seconds.

Furthermore, a 2019 study by Portent found that sites should aim for a 0-2 seconds load time to improve transaction conversions.

Above all, Google has confirmed that page speed is a ranking factor for both mobile and desktop searches and recommends the use of PageSpeed Insights and Lighthouse to evaluate site performance.
So, improving your page speed should be a priority to enhance the user experience and boost search engine rankings.
PageSpeed Insights is a free performance evaluation tool that analyzes any URL and provides a score out of 100 for both its mobile and desktop versions. It also offers several recommendations for improvement and identifies opportunities for optimization.

The tool is powered by Lighthouse that provides lab data and field data.
Getting a 100/100 score isnโt a direct indicator of page speed. You can have a fast-loading website without achieving a perfect score.
Neither do visitors care about a perfect score. All they want is to view your content quickly. So itโs more important to focus on implementing the recommendations given by the tool.
The performance metric results used to calculate your score have different weightages.
This table gives the weights for lab data in Lighthouse 8:
| Performance metric | Weightage |
| FCP | 10% |
| SI | 10% |
| LCP | 25% |
| TTI | 10% |
| TBT | 30% |
| CLS | 15% |
Instead of these weightages, what youโre shown is an aggregate performance score and a color that denotes your score bucket:
The tool provides detailed action items in the Opportunities section to help you improve your score.
Based on the recommendations offered by the PSI tool, here are 12 ways in which you can improve your performance score:
Redirects are commonly used when you delete or move a page on your website.
They increase time-to-first-byte (TTFB), which is the amount of time taken between a request to the server and when the first byte of data is sent back to the requester. While thereโs nothing inherently wrong with using redirects, excessive use causes delays in page loading.
Ensure you use redirects only when necessary to improve page loading speeds and improve overall SEO.
Minification refers to the process of eliminating or fixing unnecessary or duplicated data without affecting how a browser processes HTML. It involves removing unnecessary spaces, characters, and duplications.
Minifying CSS, HTML, and JavaScript reduces the size of these files and improves page loading speed.

Use plugins like WP Rocket, HTML Minify, or Autoptimize to automatically minify your code in WordPress.
Lazy loading involves prioritizing the loading of images that are immediately visible instead of making the browser load all the images on the page before displaying above-the-fold content. It reduces the amount of time taken to reach FCP and FMP.
By prioritizing above-the-fold content and deferring offscreen images, you can improve site performance. If you have implemented โinfinite scrollingโ as most content-heavy sites do, you must use lazy loading.

Use WordPress plugins like Lazy Load by WP Rocket and a3 Lazy Load. Autoptimize also has lazy loading features.
Server response time or TTFB is a measure of how long the browser is required to wait before it gets its first byte of data from the server. The longer this period is, the longer it takes for the page to load.
A low TTFB is not the same as a fast overall site speed, but a fast server response time improves site performance.

Methods to speed up server response times:
Render-blocking resources are static files like JavaScript, CSS, HTML, and fonts that are crucial for the rendering of a webpage. The visitorโs browser is required to download and process these files before the rest of the page can be displayed.
Thus, having a lot of these files โabove the foldโ creates a bottleneck and slows down site speed.

There are two methods to remove render-blocking resources:
The โmain threadโ is the chief element of a userโs browser that is tasked with changing code into a webpage that visitors can work with. It has two functions: it parses and executes JavaScript, HTML, and CSS and handles user interactions.
When the main thread is working on the siteโs code, it cannot simultaneously handle user requests. Thus, if the main-thread work takes too long (>4 seconds), it leads to slow page loading speed and poor UX.

Methods to minimize main-thread work:
Images in next-gen formats like JPEG 2000, JPEG XR, and WebP load faster than commonly-used file formats like JPEG and PNG.
WebP images are increasingly becoming the standard format for images and plugins like Smush and Imagify offer a WebP conversion feature.
Browser caching is a basic optimization that enables your webpages to load faster for repeat visitors. When the visitor moves to a new page on your site, caching ensures that all your data (like logos and fonts) does not have to be reloaded.
This results in a vast improvement in site speed.

Pressable customers can take advantage of our premium edge caching that’s included with all of our plans. Websites on other hosts can rely on plugins like W3 Total Cache, WP Super Cache, and WP Rocket for WordPress websites to implement browser caching.
Google PageSpeed Insights requires you to have an โefficientโ cache policy. This means that you need to optimize the frequency at which your browser clears its cache. But you donโt want it to be too often because it defeats the purpose of having browser caching.
You can optimize your cache expiration period by adding Cache-Control and Expires headers to an Nginx server. If you have Apache servers, you can edit or create a .htaccess file (with the help of a web developer).
You can also consider hosting Google Analytics locally with plugins like Perfmatters and Complete Analytics Optimization Suite (CAOS).
Large layout shifts lead to a frustrating user experience because page elements appear suddenly, shift around, and interfere with how visitors interact with the webpage. When layout shifts happen, just as a visitor is about to click or tap on an element (buttons, images, contact forms), the screen moves down and theyโve clicked on something else.
Avoiding large layout shifts is particularly important for mobile devices. A poor CLS score indicates that your webpage is โjanky,โ or visually unstable.

Ways to prevent large layout shifts:
Slow pages and low PageSpeed Insights scores are mainly caused by large images. Optimizing images helps lower FCP and LCP times and prevents CLS issues.

Here are a few ways in which you can optimize images:
Third-party scripts can lower the performance of your site by prolonging main-thread work. Examples of third-party scripts are:
While some of these may be necessary for your website, there are ways to minimize their impact:
The Document Objective Model (DOM) is how browsers transform HTML into objects. It uses a tree structure with several individual nodes that represent each object. The larger the DOM size, the longer it will take your webpage to load.
Google PageSpeed Insights will recommend that you reduce the number of nodes and the complexity of your CSS styling.
You should also use a lightweight website theme that uses GZIP compression or has a more responsive design. Heavy themes add more volumes of elements to the DOM and may have convoluted styling that slows page loading speeds.
Google PageSpeed Insights is an invaluable tool for site owners and marketers, even those with less technical knowledge. By following the recommendations in the PSI report (but not obsessing over getting a perfect score), youโre sure to boost your websiteโs rankings in SERPs.
Discover the comprehensive comparison between Nginx and Apache’s performance. Real-life use cases, optimization strategies & server selection guide included.
In this article, we’ll show you to to run your own benchmarks against your WordPress site and introduce you to a few tools to help you along your journey.
Google’s research shows that 53% of mobile users leave a page that takes longer than three seconds to load, highlighting the critical nature of optimal server response times. For WordPress site owners, server response time […]