{"id":108222,"date":"2023-12-06T19:33:05","date_gmt":"2023-12-07T00:33:05","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=108222"},"modified":"2026-01-22T11:25:33","modified_gmt":"2026-01-22T16:25:33","slug":"optimize-wordpress-performance","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/","title":{"rendered":"The Ultimate Guide to Optimizing WordPress Performance"},"content":{"rendered":"<figure class=\"wp-block-image size-full skip-lazy\"><img decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance-1024x538.png\" class=\"optimized-lcp-image\" alt=\"\" loading=\"eager\" fetchpriority=\"high\" sizes=\"(max-width: 768px) 100vw, 768px\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png 1200w\"><\/figure>\n\n\n\n<p>In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues with WordPress and the server it\u2019s hosted on. Our guide combines over 20 years of experience of fine-tuning servers, CDNs, and website code to deliver high performance WordPress sites. If you\u2019re currently experiencing subpar performance and need to speed up your WordPress site, then you\u2019ll find all your answers in this ultimate guide.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Executive-Summary\">Executive Summary<\/h2>\n\n\n\n<p>This guide addresses 3 key areas and includes the background knowledge to extend the core recommendations to your specific use cases. This Executive Summary covers the most impactful in order of ease. <strong>The complete guide is recommended for teams responsible for business critical websites that need to perform at the highest levels.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Server-Type-and-Configurations\">Server Type and Configurations<\/h3>\n\n\n\n<p>It is generally best to run a high performance WordPress on a standalone server. If you will be running it with a management system, like cPanel, or other services like email, you should use a server that has sufficient resources for WordPress plus the other systems. <strong>Review your current hosting for what it offers and aim for higher resource specifications and then work down. Trying to save $20\/month in <a href=\"https:\/\/www.inmotionhosting.com\/blog\/web-hosting-and-maintenance\/\">hosting fees can cost you<\/a> significant time and resources trying to Band-Aid your current system. Don\u2019t fall into that trap if you are running a high traffic WordPress site that needs to perform under stress.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>4vCPU\/4GB RAM on NVMe storage as a minimum for a standalone server<\/li>\n\n\n\n<li>8vCPU\/8GB RAM on NVMe storage as a minimum for WP + cPanel\/other services<\/li>\n<\/ul>\n\n\n\n<p>Additional CPUs are recommended for throughput and resilience. Large amounts of RAM allow for aggressive caching strategies for speed and for resilience at high request levels.<\/p>\n\n\n\n<p>The following server stack is recommended with the following base configurations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP 8.0+ with PHP-FPM with 20+ Workers<\/li>\n\n\n\n<li>Opcache On with a pool minimum of 128MB RAM. Keep your <code>opcache_hit_rate<\/code> close to 100% by increasing the pool as needed.<\/li>\n\n\n\n<li>Use Redis with a high <code>maxmemory<\/code> setting. Minimum of 256MB of RAM. Avoid key eviction if possible by setting the memory directive higher, and set the eviction policy to <code>allkeys-lru<\/code>, or Least Recently Used.<\/li>\n\n\n\n<li>Optimize your MariaDB with a large <code>innodb_buffer_pool_size<\/code> using the values provided in our RAM Allocation Table to start. Enable query caching. Monitor for temp table creation and modify to avoid creating temp tables on disk. Prune your WP database of old nonessential data like auto-saved drafts, comment spam, and transients. Perform Audits and tune your settings.<\/li>\n\n\n\n<li>Use NGINX + Apache for the web server and use Brotli, gZip, and HTTP\/2<\/li>\n<\/ul>\n\n\n\n<p>Please see the <a href=\"#Server-Configuration-and-Tuning-for-WordPress\">Server Configuration &amp; Tuning for WordPress<\/a> section for complete details. Once running, follow the <a href=\"##Server-Monitoring-and-Adjusting-Performance\">Server Monitoring Recommendations<\/a> to validate your initial setup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"CDN-Decisions\">CDN Decisions<\/h3>\n\n\n\n<p>Utilize a CDN to increase both end user performance and increase your website\u2019s resilience at high request levels. The following is recommended:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use a reasonable cost CDN. As you might imagine, free CDNs, including Cloudflare, do not prioritize your website over their busy, paying clients. Bunny.net is an example of a CDN that charges a more than reasonable cost but also then keeps your website properly cached. CDN is not free and required for performance.<\/li>\n\n\n\n<li>Utilize TTLs and E-Tags to keep browsers and CDNs from going to your origin server without reason.<\/li>\n\n\n\n<li>Use Full Site Delivery, aka Full Site Acceleration. Caching static files is the typical approach but though straightforward, does not deliver the performance or resiliency levels needed.\n<ul class=\"wp-block-list\">\n<li>Full Site Delivery means your complete site is served by the CDN and dynamic content can now be optionally cached by the CDN according to your page rules.<\/li>\n\n\n\n<li>Cache \u201cTolerant Dynamic Content\u201d for set time periods. This is content that is informative for a visitor but will not be harmed by being cached for short periods of time. Think from 2 minutes to 10 minutes.<\/li>\n\n\n\n<li>Use a WP plugin to control Caching so writers publishing new Page or Posts do not need to worry about cache busting. We recommend Total Cache, but most popular Caching plugins can properly clear most popular CDNs.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>A quick followup for Full Site Acceleration as it is quite a bit of work to get right, but the reason is simple and as follows. Serving a cached version of your homepage from Points of Presence (PoPs) to 1,000 visitors in 5 minutes from edge servers geographically closest to them is much, much easier and much, much faster than having all 1,000 visitors descend the origin stack to just get the exact same page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Optimizing-Your-WordPress-Site\">Optimizing Your WordPress Site<\/h3>\n\n\n\n<p>After selecting a proper server with a solid stack and adding full site accelerated CDN, you are now going to be digging into your WordPress. Some of these steps require the above systems and some are only in WordPress. The recommendations:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Page Caching in a full site delivery setup CDN. This is a repeat of the Full Site Delivery and caching Tolerant Dynamic Content above.<\/li>\n\n\n\n<li>Use Redis for Object Caching in your WP. Use Total Cache or some other WP plugin that handles connecting and using Redis.<\/li>\n\n\n\n<li>Address negative Core Web Vitals issues.\n<ol class=\"wp-block-list\">\n<li>Leverage Common UX Patterns starting with keeping fonts, carousels, and banners within best practices.<\/li>\n\n\n\n<li>Use Minification to decrease what code will be sent to the browser and compact the code down that must be sent.<\/li>\n\n\n\n<li>Concatenate your JS and CSS files to deliver them in two or three files.<\/li>\n\n\n\n<li>Eliminate Render Blocking.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Use Preconnect and Prefetch for critical assets in your page.<\/li>\n\n\n\n<li>Image Related techniques including Lazy Loading, Image Optimization, and Image Facades.<\/li>\n\n\n\n<li>Review and address 404s as WordPress is typically set up to handle all requests through PHP and thus must process all 404s, including image 404s. 404s can be large scale and wasteful.\u00a0<\/li>\n\n\n\n<li>Disable Plugins on Pages where they are not being used. Plugin bloat can be effectively fought by selectively using Plugins only on the pages that need the functionality provided by the Plugin.\u00a0This is an advanced technique that is very powerful.<\/li>\n<\/ol>\n\n\n\n<p><strong>Top 10 Techniques to Improve Your WordPress Performance<\/strong><\/p>\n\n\n\n<p>Those 3 areas will significantly improve performance and resiliency under high traffic. In addition to this Summary we suggest you review the core background information including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#Setting-Your-Performance-Goals\">Setting Your Performance Goals<\/a><\/li>\n\n\n\n<li><a href=\"#Understanding-a-Website-Request\">Understanding a Website Request<\/a><\/li>\n\n\n\n<li><a href=\"#Server-Monitoring-and-Adjusting-Performance\">Server Monitoring &amp; Adjusting Performance<\/a><\/li>\n<\/ul>\n\n\n\n<p>Website performance is a critical factor in the success of any website. Our mission is to help you meet your performance and resilience goals for your High Traffic and High Performance WordPress Website.<\/p>\n\n\n<div class=\"imh-youtube-embed\">\n\t\t\t<iframe src=\"https:\/\/www.youtube.com\/embed\/enb5kTJwV_s\" title=\"WordPress Performance Fundamentals for Visitor Experience\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n\t\t\t<script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"VideoObject\",\"name\":\"WordPress Performance Fundamentals for Visitor Experience\",\"description\":\"Learn how to identify and fix WordPress performance issues.\",\"uploadDate\":\"2023-08-15\",\"thumbnailUrl\":\"https:\/\/img.youtube.com\/vi\/enb5kTJwV_s\/hqdefault.jpg\"}<\/script>\n\t\t<\/div>\n\n\n\n<p><em>Watch our full course on WordPress Performance Fundamentals, made possible through our partnership with freeCodeCamp.<\/em><\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Setting-Your-Performance-Goals\">Setting Your Performance Goals<\/h2>\n\n\n\n<p>Determining goals for optimizing a website\u2019s speed and performance is crucial to achieving desired outcomes. Here are some steps to help you establish clear goals and objectives:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Define your purpose:<\/strong> Start by understanding why you want to optimize your site\u2019s speed and performance. Is it to enhance user experience, reduce bounce rates, improve conversion rates, or achieve better search engine rankings? Clarifying your purpose will guide your goal-setting process.<\/li>\n\n\n\n<li><strong>Analyze current performance:<\/strong> Use tools like Google Lighthouse, Google PageSpeed Insights, Google Search Console, or WebPageTest to evaluate your website\u2019s current speed and performance. Identify areas where improvements are needed, such as slow loading times, excessive page weight, or high server response times. These insights will help you prioritize and set specific goals.<\/li>\n\n\n\n<li><strong>Prioritize metrics:<\/strong> Determine which performance metrics are most important for your website. Common metrics include page load time, time to first byte (TTFB), render start time, and interactive time. Align these metrics with your purpose to identify the most critical areas for improvement.<\/li>\n\n\n\n<li><strong>Set measurable targets:<\/strong> Establish specific, measurable, achievable, relevant, and time-bound (SMART) goals. For example, set a goal to reduce page load time by 30% within three months or achieve a TTFB of under 200 milliseconds. Clear targets will provide a benchmark for progress and help you stay focused.<\/li>\n\n\n\n<li><strong>Consider user expectations:<\/strong> Understand your target audience\u2019s expectations and browsing behavior. Different websites may require different levels of optimization based on their user base. Consider factors like device usage (mobile vs. desktop), geographic location, and connection speeds to tailor your goals accordingly.<\/li>\n\n\n\n<li><strong>Break it down:<\/strong> Divide your optimization goals into smaller, actionable tasks. For instance, optimizing image sizes, minifying CSS and JavaScript, leveraging browser caching, or implementing a content delivery network (CDN). Breaking down goals into manageable steps makes them more achievable and allows for incremental improvements.<\/li>\n\n\n\n<li><strong>Monitor and iterate:<\/strong> Regularly monitor your website\u2019s performance using performance monitoring tools or website analytics. Track progress towards your goals and identify areas that need further optimization. Continuously iterate your strategies to adapt to changing technologies and user expectations.<\/li>\n<\/ul>\n\n\n\n<p>By following these steps, you can establish well-defined goals for optimizing your website\u2019s speed and performance. Remember, the goals should be aligned with your website\u2019s purpose, measurable, and adaptable to evolving needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Performance-Testing-Tools\">Performance Testing Tools<\/h3>\n\n\n\n<p>There are many testing tools available online to gauge your website performance. In this section, we want to get a website to rank better on Google, so we will use Google\u2019s tools to achieve our goals. There are also some other pretty awesome optimization tools such as GTMetrix, Pingdom, and many others.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Google-Lighthouse\" style=\"font-size:24px\">Google Lighthouse<\/h4>\n\n\n\n<p>Before we explain how to assess your site prior to optimizing, let\u2019s go over a quick outline of how the different pieces are weighted in the Lighthouse tests. The <a href=\"https:\/\/googlechrome.github.io\/lighthouse\/scorecalc\/\" target=\"_blank\" rel=\"noreferrer noopener\">Lighthouse Scoring Calculator<\/a> gives this information at a glance, and even allows you to plug in your own scores to understand how your overall PageSpeed score is calculated.\u00a0<\/p>\n\n\n\n<p>Inside Chrome\u2019s Developer Tools (DevTools), you can use the code inspector to get to the Open Source Extension for Google Lighthouse. It is helpful because it runs tests right within your browser, and generates a report for you on how well the website you are looking at stacks up for both mobile and desktop versions. This test gives you information about performance, accessibility, best practices, and SEO.<\/p>\n\n\n\n<p class=\"alert alert-success\"><strong>Tip:<\/strong> When performing a test with DevTools, you want to use an <strong>incognito window<\/strong> or <strong>guest account<\/strong>, as browser extensions typically interfere with the test and skew the results.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"479\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Chrome-Developer-Tools-1024x479.png\" alt=\"Example of what this report looks like in your browser\" class=\"wp-image-108300\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Chrome-Developer-Tools-1024x479.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Chrome-Developer-Tools-300x140.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Chrome-Developer-Tools-768x359.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Chrome-Developer-Tools-1536x718.png 1536w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Chrome-Developer-Tools.png 1600w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><figcaption class=\"wp-element-caption\"><em>Example of what this report looks like in your browser<\/em><\/figcaption><\/figure>\n\n\n\n<p>Google Lighthouse also provides an \u201copportunity\u201d list with items you can optimize on your page to improve your site\u2019s pagespeed, and by proxy, improve the performance scoring of your page.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"465\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/pagespeed-insights-opportunites-diagnostics.png\" alt=\"PageSpeed Insights Opportunities and Diagnostics Report\" class=\"wp-image-100421\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/pagespeed-insights-opportunites-diagnostics.png 961w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/pagespeed-insights-opportunites-diagnostics-300x145.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/09\/pagespeed-insights-opportunites-diagnostics-768x372.png 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"PageSpeed-Insights\" style=\"font-size:24px\">PageSpeed Insights<\/h4>\n\n\n\n<p><a href=\"https:\/\/pagespeed.web.dev\/\">PageSpeed Insights<\/a> (PSI) is an online tool that tests your site and then delivers a score for both mobile devices and desktop computers. You will see a score and a breakdown of the metrics used to determine your site performance. PSI will also provide a breakdown of the issues causing any slowdowns to the performance of your site. Recommendations are provided on actions you can take to improve performance. PSI uses simulations and real-world data (when available) to provide its scores.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"810\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/PageSpeed-Insights-1024x810.png\" alt=\"Screenshot showing how PageSpeed Insights works\" class=\"wp-image-108302\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/PageSpeed-Insights-1024x810.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/PageSpeed-Insights-300x237.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/PageSpeed-Insights-768x607.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/PageSpeed-Insights.png 1504w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p><strong>Chrome User Experience Report<\/strong><\/p>\n\n\n\n<p>The Chrome User Experience Report is also called the Core Web Vitals metrics. This is an aggregate of user experience metrics that is compiled from actual users that visit your website over the last 28 days.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"175\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Core-Web-Vitals-Assessment-Passed.png\" alt=\"Core Web Vitals Assessment: Passed\" class=\"wp-image-108303\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Core-Web-Vitals-Assessment-Passed.png 696w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Core-Web-Vitals-Assessment-Passed-300x75.png 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>This data is not comprehensive, however. These users are limited to people that have opted to sync their browser history with Chrome, and the data is made available by PageSpeed Insights, Google\u2019s BigQuery project, and Data Studio. While it is helpful information when optimizing your website for speed and performance, it is not representative of everyone\u2019s experience with your site.\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Google-Search-Console\" style=\"font-size:24px\">Google Search Console<\/h4>\n\n\n\n<p>The Page Experience report in Google\u2019s Search Console provides you with a summary of their measurement for your visitors\u2019 user experience. Google evaluates these metrics for individual URLs on your website and will use them as a ranking signal in search results.<\/p>\n\n\n\n<p>This report covers Core Web Vitals, mobile usability, and HTTPS usage for every page that you have in Google\u2019s index. In order for a page to be counted in this report\u2019s data, it must also have data in the Core Web Vitals report simultaneously.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Other-Performance-Testing-Tools\" style=\"font-size:24px\">Other Performance Testing Tools<\/h4>\n\n\n\n<p>We should mention other tools as well because this is by no means an exhaustive list.<\/p>\n\n\n\n<p>In short, there are a ton of professional tools that you can use to measure your website\u2019s performance, such as <a href=\"https:\/\/gtmetrix.com\/\">GTMetrix<\/a>, <a href=\"https:\/\/www.pingdom.com\/\">Pingdom<\/a>, <a href=\"https:\/\/www.webpagetest.org\/\">WebPageTest<\/a>, and more.\u00a0<\/p>\n\n\n\n<p>Any tool you use will guide you with things that need to be done to improve your website speed.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Why-Are-My-Scores-Always-Different?\">Why Are My Scores Always Different?<\/h3>\n\n\n\n<p>There are many factors that will impact the score you see on these tests. These variables can range from your location related to the website, activity on your server, network routes, and even the activity on your local computer.\u00a0<\/p>\n\n\n\n<p>Because of these and many other factors, no two tests will show the exact same results.\u00a0<\/p>\n\n\n\n<p>However, with a little persistence, you can minimize the impact that your server and website bring into the equation. Simply follow the suggestions, learn about them and implement best practices. This will increase the likelihood that your visitors will have a good user experience.<\/p>\n\n\n\n<p>View <a href=\"https:\/\/github.com\/GoogleChrome\/lighthouse\/blob\/main\/docs\/variability.md\">Lighthouse\u2019s Score Variability<\/a> documentation for a table containing several common sources of metric variability, the impact they have on results, and the extent to which they are likely to occur in different environments.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Speed-and-Performance-Indicators\">Speed and Performance Indicators<\/h2>\n\n\n\n<p>When testing your website\u2019s performance and putting together your plan of attack, the tool you use will dictate the metrics used in the audit. Here are the top performance indicators to pay attention to. We recommend focusing on achieving passing (green) scores on Core Web Vitals before you move onto the other performance metrics.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Performance Metric<\/th><th class=\"has-text-align-left\" data-align=\"left\">Passing Score<\/th><th class=\"has-text-align-left\" data-align=\"left\">Core\u00a0Web Vital<\/th><th class=\"has-text-align-left\" data-align=\"left\">Testing Tools<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Cumulative Layout Shift (CLS)<\/strong><br>Measures visual stability.<\/td><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 0.1<\/td><td class=\"has-text-align-left\" data-align=\"left\">Yes<\/td><td class=\"has-text-align-left\" data-align=\"left\">Google Lighthouse, PageSpeed Insights, Google Search Console<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>First Contentful Paint (FCP)<\/strong><br>Measures time to render the first piece of DOM content.<\/td><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 1800ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">No<\/td><td class=\"has-text-align-left\" data-align=\"left\">Google Lighthouse, PageSpeed Insights, Google Search Console, GTmetrix<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>First Input Delay (FID)<\/strong><br>Measures a website\u2019s interactivity.<\/td><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 100ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Yes<\/td><td class=\"has-text-align-left\" data-align=\"left\">PageSpeed Insights, Google Search Console<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Largest Contentful Paint (LCP)<\/strong><br>Measures when the largest content element in the viewport is rendered to the screen.<\/td><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 2.5s<\/td><td class=\"has-text-align-left\" data-align=\"left\">Yes<\/td><td class=\"has-text-align-left\" data-align=\"left\">Google Lighthouse, PageSpeed Insights, Google Search Console, GTmetrix<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Speed Index (SI)<\/strong><br>Measures how quickly content is visually displayed during page load.<\/td><td class=\"has-text-align-left\" data-align=\"left\">\u00a0<\/td><td class=\"has-text-align-left\" data-align=\"left\">No<\/td><td class=\"has-text-align-left\" data-align=\"left\">Google Lighthouse, PageSpeed Insights,<br>GTmetrix<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Total Blocking Time (TBT)<\/strong><br>Measures the total amount of time a page is blocked from responding to user input.<\/td><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 200ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">No<\/td><td class=\"has-text-align-left\" data-align=\"left\">Google Lighthouse, PageSpeed Insights,<br>GTmetrix<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Time to First Byte (TTFB)<\/strong><br>Measures server response times.<\/td><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 200ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">No<\/td><td class=\"has-text-align-left\" data-align=\"left\">PageSpeed Insights, GTmetrix<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Core-Web-Vitals\">Core Web Vitals<\/h3>\n\n\n\n<p>The key to success for your website is to focus on the user experience. Google\u2019s Core Web Vitals are a set of metrics that measure real-world user experience for loading performance, interactivity, and visual stability of the page. These metrics are designed to help you understand how good the user experience is on your site compared to other sites on the web.\u00a0<\/p>\n\n\n\n<p><a href=\"https:\/\/www.inmotionhosting.com\/blog\/core-web-vitals\/\">Core Web Vitals<\/a> are broken down into a subset of page experience signals that apply to all websites and should be measured by website owners. The metrics that make up Core Web Vitals are subject to evolve over time as these signals are not set in stone, and are intended to change as time passes to continue improving the overall user experience on the web.\u00a0<\/p>\n\n\n\n<p>Page Experience Signals and Core Web Vitals are the best signals that developers have to measure and improve the quality of user experience, and they are broken down into Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS). Below, we will outline what each signal is, and share some best practices and steps to take to ensure you improve your website\u2019s performance in relation to each metric.\u00a0<\/p>\n\n\n\n<p>Tools that measure Core Web Vitals consider a page to be passing if it meets the recommended target of 75th percentile for all 3 metrics.\u00a0<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Largest-Contentful-Paint\" style=\"font-size:24px\">Largest Contentful Paint (LCP)\u00a0\u00a0\u00a0<\/h4>\n\n\n\n<p>LCP measures your website\u2019s loading performance. In order to provide a good user experience for your visitors, your LCP should occur within 2.5 seconds of the initial page loading.\u00a0<\/p>\n\n\n\n<p>The types of elements that are considered for largest contentful paint are usually images or videos. It is important to understand that an element can only be considered the LCP once it is rendered, and the user can see it.\u00a0<\/p>\n\n\n\n<p>This metric is also tied to First Contentful Paint (FCP), which measures how long it takes for the initial DOM content to render, but FCP does not account for how long it takes the largest and usually more important content on page to render.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>What LCP represents:<\/strong> A user\u2019s perception of loading experience.<\/li>\n\n\n\n<li><strong>Lighthouse Performance score weighting:<\/strong> 25%<\/li>\n\n\n\n<li><strong>What it measures:<\/strong> The point in the page load timeline when the page\u2019s largest image or text block is visible within the viewport.<\/li>\n\n\n\n<li><strong>How it\u2019s measured:<\/strong> Lighthouse extracts LCP data from <a href=\"https:\/\/www.chromium.org\/developers\/how-tos\/trace-event-profiling-tool\">Chrome\u2019s tracing tool<\/a>.<\/li>\n\n\n\n<li><strong>Is Largest Contentful Paint a Web Core Vital?<\/strong> Yes<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">LCP Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">LCP Time (seconds)<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 2.5 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">2.5 \u2013 4.0 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/\u00a0Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 4.0 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">What Elements are Part of LCP?<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>&lt;img&gt;<\/code> elements<\/li>\n\n\n\n<li><code>&lt;image&gt;<\/code> elements inside an <code>&lt;svg&gt;<\/code> element<\/li>\n\n\n\n<li><code>&lt;video&gt;<\/code> elements (the poster image is used)<\/li>\n\n\n\n<li>An element with a background image loaded via the url() function (as opposed to a CSS gradient)<\/li>\n\n\n\n<li>Block-level elements containing text nodes or other inline-level text elements children.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How To Define LCP Using Chrome DevTools<\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the page in Chrome.<\/li>\n\n\n\n<li>Navigate to the <strong>Performance<\/strong> panel of DevTools (<strong>Command + Option + I<\/strong> on Mac or <strong>Control + Shift + I<\/strong> on Windows and Linux).<\/li>\n\n\n\n<li>Hover over the LCP marker in the <strong>Timings<\/strong> section.<\/li>\n\n\n\n<li>The element(s) that correspond to LCP is detailed in the <strong>Related Node<\/strong> field.<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">What Causes Poor LCP?<\/h5>\n\n\n\n<p>Poor LCP typically comes from four issues:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Slow server response times.<\/li>\n\n\n\n<li>Render-blocking JavaScript and CSS.<\/li>\n\n\n\n<li>Resource load times.<\/li>\n\n\n\n<li>Client-side rendering.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve LCP<\/h5>\n\n\n\n<p>The usual suspects of a poor LCP can be caused by many things. Some of the causes can be slow response times from the server, render blocking JavaScript and CSS, slow resource load times and even client rendering.<\/p>\n\n\n\n<p>Slow server response times is the first thing you should tackle when optimizing for performance. A faster server response will directly impact and improve every page loading measurement, including LCP.<\/p>\n\n\n\n<p>If the cause is <strong>slow server response time<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Optimize your server.<\/li>\n\n\n\n<li>Route users to a nearby CDN.<\/li>\n\n\n\n<li>Cache assets.<\/li>\n\n\n\n<li>Serve HTML page cache-first.<\/li>\n\n\n\n<li>Establish third-party connections early.<\/li>\n<\/ul>\n\n\n\n<p>If the cause is <strong>render-blocking JavaScript and CSS<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Minify CSS.<\/li>\n\n\n\n<li>Defer non-critical CSS.<\/li>\n\n\n\n<li>Inline critical CSS.<\/li>\n\n\n\n<li>Minify and compress JavaScript files.<\/li>\n\n\n\n<li>Defer unused JavaScript.<\/li>\n\n\n\n<li>Minimize unused polyfills.<\/li>\n<\/ul>\n\n\n\n<p>If the cause is <strong>resource load times<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Optimize and compress images.<\/li>\n\n\n\n<li>Preload important resources.<\/li>\n\n\n\n<li>Compress text files.<\/li>\n\n\n\n<li>Deliver different assets based on the network connection (adaptive serving).<\/li>\n\n\n\n<li>Cache assets using a service worker.<\/li>\n<\/ul>\n\n\n\n<p>If the cause is <strong>client-side rendering<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Minimize critical JavaScript.<\/li>\n\n\n\n<li>Use another <a href=\"https:\/\/www.searchenginejournal.com\/rendering-seo-introduction\/330399\/\" target=\"_blank\" rel=\"noopener\">rendering strategy<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"First-Input-Delay\" style=\"font-size:24px\">First Input Delay (FID)<\/h4>\n\n\n\n<p>First Input Delay (FID) measures a website\u2019s interactivity and focuses on input events from discrete actions like clicks, taps, and key presses. When a website does not respond in a certain amount of time after a user interaction, users experience this as lag, or slowdown. To provide a good user experience your web pages should have a FID of 100 milliseconds or less.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>What it represents:<\/strong> Your user\u2019s first impression of your site\u2019s interactivity and responsiveness.<\/li>\n\n\n\n<li><strong>Lighthouse Performance score weighting:<\/strong> N\/A<\/li>\n\n\n\n<li><strong>What it measures:<\/strong> Measures the time from when a user first interacts with your site (when they click a link, tap a button, or use a custom, JavaScript-powered control) to the time when the browser is actually able to respond to that interaction.<\/li>\n\n\n\n<li><strong>How it\u2019s measured:<\/strong> FID requires a real user and thus cannot be measured in the lab. However, the Total Blocking Time (TBT) metric is lab-measurable and can be used as a proxy as it correlates well with FID in the field, and also captures issues that affect interactivity. Optimizations that improve TBT should also improve FID in the field.<\/li>\n\n\n\n<li><strong>Is Largest Contentful Paint a Web Core Vital?<\/strong> Yes<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">FID Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">FID Time (milliseconds)<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 100 milliseconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">101 \u2013 300 milliseconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/\u00a0Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 300 milliseconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">What Causes Poor FID?<\/h5>\n\n\n\n<p>The main cause of a poor FID is heavy JavaScript execution. Optimizing how JavaScript parses, compiles, and executes on your web page will directly reduce FID.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve FID<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reduce the impact of third-party script execution<\/li>\n\n\n\n<li>Reduce JavaScript execution time\n<ul class=\"wp-block-list\">\n<li>Defer unused JavaScript<\/li>\n\n\n\n<li>Minimize unused polyfills<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Break up Long Tasks<\/li>\n\n\n\n<li>Optimize your page for interaction readiness<\/li>\n\n\n\n<li>Use a web worker<\/li>\n\n\n\n<li>Minimize main thread work<\/li>\n\n\n\n<li>Keep request counts low and transfer sizes small<\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Cumulative-Layout-Shift\" style=\"font-size:24px\">Cumulative Layout Shift (CLS)<\/h4>\n\n\n\n<p>CLS measures visual stability. A good user experience is measured as having a CLS of 0.1 or less. This allows the experience to avoid any surprises for the user but isn\u2019t particularly helpful for page speed, it\u2019s more a measurement that your website is following best practices and is a necessary piece for achieving a high performance score for your page.<\/p>\n\n\n\n<p>These best practices include following common UX patterns that are optimized for CLS. When your page is loading, you should always be sure to set size attributes or reserve space. This will help ensure your page does not jitter and move for the customer while they are trying to interact with it.\u00a0<\/p>\n\n\n\n<p>Your website should never insert content above existing content unless a user interacts and expects the behavior, and you should always use transform animations when transforming the layout during said interactions.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>What it represents:<\/strong> The visual stability of a page. Instability is defined as unexpected movement of page content as the user is trying to interact with the page.<\/li>\n\n\n\n<li><strong>Lighthouse Performance score weighting:<\/strong> 15%<\/li>\n\n\n\n<li><strong>What it measures:<\/strong> CLS measures the largest burst of layout shift scores for every unexpected layout shift that occurs during the entire lifespan of a page. A layout shift occurs any time a visible element changes its position from one rendered frame to the next.<\/li>\n\n\n\n<li><strong>How it\u2019s measured:<\/strong> To calculate the layout shift score, the browser looks at the viewport size and the movement of unstable elements in the viewport between two rendered frames. The layout shift score is a product of two measures of that movement: the impact fraction and the distance fraction<\/li>\n\n\n\n<li><strong>Is Cumulative Layout Shift a Web Core Vital?<\/strong> Yes<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">CLS Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">CLS Scores<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0.1<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">0.1 \u2013 0.25<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/\u00a0Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 0.25<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How To See CLS Using Chrome DevTools<\/h5>\n\n\n\n<p>Use DevTools to help debug layout shifts by leveraging the <strong>Experience<\/strong> pane under the <strong>Performance<\/strong> panel.<\/p>\n\n\n\n<p>The <strong>Summary<\/strong> view for a Layout Shift record includes the Cumulative Layout Shift score as well as a rectangle overlay showing the affected regions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"397\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/DevTools-Performance-Panel.png\" alt=\"Use DevTool's Performance Panel to what is causing layout shifts.\" class=\"wp-image-108299\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/DevTools-Performance-Panel.png 724w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/DevTools-Performance-Panel-300x165.png 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">What Causes Poor Layout Shifts?<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Changes to the position of a DOM element\n<ul class=\"wp-block-list\">\n<li>This is often the result of:\n<ul class=\"wp-block-list\">\n<li>Stylesheets that are loaded late or overwrite previously declared style.<\/li>\n\n\n\n<li>Delays in animation and transition effects.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Changes to the dimensions of a DOM element\n<ul class=\"wp-block-list\">\n<li>This often the result of:\n<ul class=\"wp-block-list\">\n<li>Images, ads, embeds, and iframes without dimensions<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Insertion or removal of a DOM element<\/li>\n\n\n\n<li>Animations that trigger layout\n<ul class=\"wp-block-list\">\n<li>This is often the result of:\n<ul class=\"wp-block-list\">\n<li>Insertion of ads and other third-party embeds.<\/li>\n\n\n\n<li>Insertion of banners, alerts, and modals.<\/li>\n\n\n\n<li>Infinite scroll and other UX patterns that load additional content above existing content.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Actions waiting for a network response before updating DOM<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve CLS<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always set size attributes to images and video elements, or allocate the correct amount of space for that element while it is loading.<\/li>\n\n\n\n<li>Never insert content above existing content, except during an intentional user interaction.<\/li>\n\n\n\n<li>Prefer transform animations to animations of properties that trigger layout changes.<\/li>\n\n\n\n<li>Preload fonts using <code>&lt;link rel=preload&gt;<\/code> on the key web fonts, and combine <code>&lt;link rel=preload&gt;<\/code> with <code>font-display: optional<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><strong>Additional Resources<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/web.dev\/cls\/\" target=\"_blank\" rel=\"noopener\">Cumulative Layout Shift (CLS)<\/a> \u2013 web.dev<\/li>\n\n\n\n<li><a href=\"https:\/\/web.dev\/optimize-cls\/\" target=\"_blank\" rel=\"noopener\">Optimize Cumulative Layout Shift<\/a> \u2013 web.dev<\/li>\n\n\n\n<li><a href=\"https:\/\/web.dev\/debug-layout-shifts\/\" target=\"_blank\" rel=\"noopener\">Debug Layout Shifts<\/a> \u2013 web.dev<\/li>\n<\/ul>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Other-Performance-Opportunities\">Other Performance Opportunities<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"First-Contentful-Paint\" style=\"font-size:24px\">First Contentful Paint (FCP)<\/h4>\n\n\n\n<p>Measures time to render the first piece of DOM content.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>What it represents: <\/strong>The amount of time it takes the browser to render the first piece of DOM content after a user navigates to your page. Images, non-white &lt;<strong>canvas<\/strong>&gt; elements, and SVGs on your page are considered DOM content.<\/li>\n\n\n\n<li><strong>Lighthouse Performance score weighting:<\/strong> 10%<\/li>\n\n\n\n<li><strong>What it measures:<\/strong> FCP is a user-centric metric for measuring perceived load speed because it marks the first point in the page load timeline where the user can see anything on the screen.<\/li>\n\n\n\n<li><strong>How it\u2019s measured:<\/strong> The FCP score is a comparison of your page\u2019s FCP time and FCP times for real websites, based on data from the HTTP Archive.<\/li>\n\n\n\n<li><strong>Is Largest Contentful Paint a Web Core Vital?<\/strong> No<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">FCP Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">FCP Time (seconds)<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 1.8 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">1.8 \u2013 3 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/ Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 3 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve FCP<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Eliminate render-blocking resources<\/li>\n\n\n\n<li>Minify CSS<\/li>\n\n\n\n<li>Remove unused CSS<\/li>\n\n\n\n<li>Preconnect to required origins<\/li>\n\n\n\n<li>Reduce server response times (TTFB)<\/li>\n\n\n\n<li>Avoid multiple page redirects<\/li>\n\n\n\n<li>Preload key requests<\/li>\n\n\n\n<li>Avoid enormous network payloads<\/li>\n\n\n\n<li>Serve static assets with an efficient cache policy<\/li>\n\n\n\n<li>Avoid an excessive DOM size<\/li>\n\n\n\n<li>Minimize critical request depth<\/li>\n\n\n\n<li>Ensure text remains visible during webfont load<\/li>\n\n\n\n<li>Keep request counts low and transfer sizes small<\/li>\n<\/ul>\n\n\n\n<p><strong>Additional Resources<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/web.dev\/fcp\/\" target=\"_blank\" rel=\"noreferrer noopener\">First Contentful Paint (FCP)<\/a> \u2013 web.dev<\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Speed-Index\" style=\"font-size:24px\">Speed Index (SI)<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>What it represents:<\/strong> The average time at which visible parts of the page are displayed.<\/li>\n\n\n\n<li><strong>Lighthouse Performance score weighting:<\/strong> 10%<\/li>\n\n\n\n<li><strong>What it measures:<\/strong> Speed Index measures how quickly content is visually displayed during page load. Lighthouse first captures a video of the page loading in the browser and computes the visual progression between frames.<\/li>\n\n\n\n<li><strong>How it\u2019s measured:<\/strong> The Speed Index score is a comparison of your page\u2019s speed index and the speed indices of real websites, based on data from the HTTP Archive.<\/li>\n\n\n\n<li><strong>Is Largest Contentful Paint a Web Core Vital?<\/strong> No<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">Speed Index Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Speed Index (seconds)<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 3.4 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">3.4 \u2013 5.8 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/\u00a0Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 5.8 seconds<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve Speed Index<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Minimize main thread work<\/li>\n\n\n\n<li>Reduce JavaScript execution time<\/li>\n\n\n\n<li>Ensure text remains visible during webfont load<\/li>\n\n\n\n<li>Eliminate render-blocking resources<\/li>\n<\/ul>\n\n\n\n<p><strong>Additional Resources<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/web.dev\/speed-index\/\" target=\"_blank\" rel=\"noreferrer noopener\">Speed Index<\/a> \u2013 web.dev<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/WPO-Foundation\/webpagetest-docs\/blob\/main\/src\/metrics\/SpeedIndex.md\" target=\"_blank\" rel=\"noreferrer noopener\">WebPagetest Speed Index<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Total-Blocking-Time\" style=\"font-size:24px\">Total Blocking Time (TBT)<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>What it represents:<\/strong> The total amount of time that a page is blocked from responding to user input, such as mouse clicks, screen taps, or keyboard presses.<\/li>\n\n\n\n<li><strong>Lighthouse Performance score weighting:<\/strong> 30%<\/li>\n\n\n\n<li><strong>What it measures: <\/strong>TBT measures the time between First Contentful Paint and Time to Interactive. TBT is the lab equivalent of First Input Delay (FID) \u2013 the field data used in the Chrome User Experience Report and Google\u2019s Page Experience ranking signal.<\/li>\n\n\n\n<li><strong>How it\u2019s measured:<\/strong> The total time in which the main thread is occupied by tasks taking more than 50ms to complete. If a task takes 80ms to run, 30ms of that time will be counted toward TBT. If a task takes 45ms to run, 0ms will be added to TBT.<\/li>\n\n\n\n<li><strong>Is Total Blocking Time a Web Core Vital?<\/strong> Yes! It\u2019s the lab data equivalent of First Input Delay (FID).<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">TBT Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">TBT Time (milliseconds)<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 200ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">200 \u2013 600ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/ Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 600ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">Long Tasks and Total Blocking Time<\/h5>\n\n\n\n<p>TBT measures long tasks \u2013 those taking longer than 50ms.<\/p>\n\n\n\n<p>When a browser loads your site, there is essentially a single line queue of scripts waiting to be executed. Any input from the user has to go into that same queue.<\/p>\n\n\n\n<p>When the browser can\u2019t respond to user input because other tasks are executing, the user perceives this as lag.<\/p>\n\n\n\n<p>Essentially, long tasks are like that person at your favorite coffee shop who takes far too long to order a drink. Like someone ordering a 2% venti four-pump vanilla, five-pump mocha whole-fat froth, long tasks are a major source of bad experiences.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/h75c4-9JwYEN_R8dW2qPEcWzcPIw2zuPDwMq54gV8fVKcVmZ5FIW3LJpLipyvDnk64K-nWsZ9iPU4HZzX3votVBB9BRwVbXfwma5W5_rDpP_VrLhMQxFW63ih8J7ex7jTJAFRdVOciw3XC0DbzErZzw\" alt=\"Short tasks vs. long tasks\"><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">What Causes High TBT on your Page?<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Heavy JavaScript<\/li>\n\n\n\n<li>Heavy CSS<\/li>\n<\/ul>\n\n\n\n<p>That\u2019s it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How To See TBT Using Chrome DevTools<\/h5>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/DijcMmxAe7wLRYiLDGEG_UETMgprKPpCNnc-VRkQQqJy29kp9TCAlOhfFiaTL3I3oTFQC9PBMvVsHTCqdfWkuGUdp5_at99v04BpWWgFv04OiIBihn90ZKHyfOt6A_4P5cvoNkW4giz9UI_g8tIdmmA\" alt=\"How To See TBT Using Chrome DevTools\n\"><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve TBT<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Break up Long Tasks.<\/li>\n\n\n\n<li>Optimize your page for interaction readiness.<\/li>\n\n\n\n<li>Use a web worker.<\/li>\n\n\n\n<li>Reduce JavaScript execution time.<\/li>\n<\/ul>\n\n\n\n<p><strong>Additional Resources<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/web.dev\/fid\/\" target=\"_blank\" rel=\"noreferrer noopener\">First Input Delay (FID)<\/a> \u2013 web.dev<\/li>\n\n\n\n<li><a href=\"https:\/\/web.dev\/tbt\/\" target=\"_blank\" rel=\"noreferrer noopener\">Total Blocking Time (TBT)<\/a> \u2013 web.dev<\/li>\n\n\n\n<li><a href=\"https:\/\/web.dev\/optimize-fid\/\" target=\"_blank\" rel=\"noreferrer noopener\">Optimize First Input Delay<\/a> \u2013 web.dev<\/li>\n\n\n\n<li><a href=\"https:\/\/web.dev\/lighthouse-total-blocking-time\/\" target=\"_blank\" rel=\"noreferrer noopener\">Lighthouse: Total Blocking Time<\/a> \u2013 web.dev<\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Time-to-First-Byte\" style=\"font-size:24px\">Time to First Byte (TTFB)<\/h4>\n\n\n\n<p>Time to First Byte (TTFB) is a foundational metric for measuring the time between the request for a resource and when the first byte of a response begins to arrive. It helps identify when a web server is too slow to respond to requests.<\/p>\n\n\n\n<p>TTFB is the sum of the following request phases:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Redirect time<\/li>\n\n\n\n<li>Service worker startup time (if applicable)<\/li>\n\n\n\n<li>DNS lookup<\/li>\n\n\n\n<li>Connection and TLS negotiation<\/li>\n\n\n\n<li>Request, up until the point at which the first byte of the response has arrived<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">TTFB Scoring<\/h5>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">TTFB Time (milliseconds)<\/th><th class=\"has-text-align-left\" data-align=\"left\">Color-Coding Score<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">0 \u2013 800ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Green (Fast \/ Good)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">800 \u2013 1,800ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Orange (Moderate \/ Needs Improvement)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Over 1,800ms<\/td><td class=\"has-text-align-left\" data-align=\"left\">Red (Slow \/ Poor)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Improve TTFB<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hosting services with inadequate infrastructure to handle high traffic loads<\/li>\n\n\n\n<li>Web servers with insufficient memory that can lead to thrashing<\/li>\n\n\n\n<li>Unoptimized database tables<\/li>\n\n\n\n<li>Suboptimal database server configuration<\/li>\n\n\n\n<li>Avoid multiple page redirects<\/li>\n\n\n\n<li>Preconnect to required origins for cross-origin resources<\/li>\n\n\n\n<li>Submit your origin to the HSTS preload list to eliminate HTTP-to-HTTPS redirect latency<\/li>\n\n\n\n<li>Use HTTP\/2 or HTTP\/3<\/li>\n\n\n\n<li>Use server-side generation (SSG) for markup instead of SSR where possible and appropriate<\/li>\n<\/ul>\n\n\n\n<p>Minimizing TTFB starts with choosing a suitable hosting provider with infrastructure to ensure high uptime and responsiveness. This in combination with a CDN can help significantly.<\/p>\n\n\n\n<p><strong>Additional Resources<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/web.dev\/ttfb\/\" target=\"_blank\" rel=\"noreferrer noopener\">Time to First Byte (TTFB)<\/a> \u2013 web.dev<\/li>\n<\/ul>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Time-to-Interactive\" style=\"font-size:24px\">Time to Interactive (TTI)<\/h4>\n\n\n\n<p>In February 2023, Google Chrome announced that it would remove the Time To Interactive (TI) score in Lighthouse 10.\u00a0<\/p>\n\n\n\n<p>Time to Interactive (TTI) measures how long it takes a page to become fully interactive. The reason for removing TTI is because other metrics like Largest Contentful Paint (LCP), Speed Index, and Total Blocking Time together are better measures of when a webpage feels loaded.<\/p>\n\n\n<div class=\"jumbotron\">\r\n<p>Improve the performance and security of your WordPress website with our <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-hosting-performance\">WordPress VPS Hosting<\/a> plans. Featuring blazing fast servers with advanced caching, 99.99% uptime, and a robust toolkit developed by WordPress experts.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Improve Core Web Vitals    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Free SSL &amp; Dedicated IP    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Advanced Server Caching    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>US &amp; EU Data Centers<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-hosting-performance\">VPS for WordPress<\/a><\/p>\r\n<\/div>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Understanding-a-Website-Request\">Understanding a Website Request<\/h2>\n\n\n\n<p>In this section, we\u2019ll discuss how the speed of a request to a website impacts overall website performance.<\/p>\n\n\n\n<p>When a user makes a request to load a website, a series of processes happen behind the scenes to deliver the requested content to the user\u2019s browser. The process can be broken down into the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>DNS Lookup:<\/strong> The Domain Name System (DNS) is a distributed database that maps domain names to IP addresses. When a user types a URL into their browser, the browser first sends a request to a DNS server to look up the IP address of the domain name.<\/li>\n<\/ol>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3351\" height=\"1347\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS.png\" alt=\"Infographic showing how a DNS Lookup works.\" class=\"wp-image-108257\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS.png 3351w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS-300x121.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS-1024x412.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS-768x309.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS-1536x617.png 1536w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-DNS-2048x823.png 2048w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Connection:<\/strong> Once the browser has the IP address of the website, it establishes a connection to the server hosting the website using the Hypertext Transfer Protocol (HTTP) or the more secure HTTPS protocol.<\/li>\n\n\n\n<li><strong>Request:<\/strong> After establishing the connection, the browser sends an HTTP request to the server requesting the specific web page or resource that the user wants to access.<\/li>\n<\/ol>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3033\" height=\"1233\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections.png\" alt=\"Infographic showing how an HTTP request works.\" class=\"wp-image-108259\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections.png 3033w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections-300x122.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections-1024x416.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections-768x312.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections-1536x624.png 1536w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-HTTP_S-Connections-2048x833.png 2048w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Processing:<\/strong> The server receives the request and begins to process it. This may involve executing scripts, querying databases, and retrieving files from the file system.<\/li>\n\n\n\n<li><strong>Response:<\/strong> Once the server has processed the request, it sends an HTTP response back to the browser. This response includes the requested content, such as the HTML, CSS, JavaScript, and any images or other resources required to display the web page.<\/li>\n\n\n\n<li><strong>Rendering:<\/strong> The browser receives the response from the server and begins to render the web page. This involves parsing the HTML and rendering the layout, styling the page with CSS, executing JavaScript, and loading any images or other resources required to display the page.<\/li>\n\n\n\n<li><strong>User Interaction:<\/strong> Finally, the user can interact with the web page, clicking on links, filling out forms, and performing other actions.<\/li>\n<\/ol>\n\n\n\n<p>These steps happen very quickly, often in a matter of milliseconds, but any delay or bottleneck in any of these steps can cause the page to load slowly or not at all, leading to a poor user experience. To optimize website performance, it\u2019s important to identify and address any performance issues at each stage of this process.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2361\" height=\"1647\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request.png\" alt=\"Infographic showing how a Website Request works\" class=\"wp-image-108261\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request.png 2361w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request-300x209.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request-1024x714.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request-768x536.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request-1536x1071.png 1536w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Server-Request-2048x1429.png 2048w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Server-Configuration-and-Tuning-for-WordPress\">Server Configuration &amp; Tuning for WordPress<\/h2>\n\n\n\n<p>These tips explain what measures can be taken with Redis, MySQL, Opcache, and other technologies to achieve a high performance server. There are many opportunities to improve performance. We focus on fast storage and emphasize tuning the cache. Accessing files from NVMe storage, storing PHP scripts in Opcache, and compressing responses with Brotli are all part of a high performance server. Read on to find out how to <a href=\"https:\/\/www.inmotionhosting.com\/blog\/what-is-server-monitoring\/\">analyze your server performance<\/a> and make incremental improvements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"PHP-Server-Side-Options\">PHP Server Side Options<\/h3>\n\n\n\n<p>The web server communicates with PHP-FPM, which is a separate process responsible for handling PHP requests. The request is passed from the web server to PHP-FPM via FastCGI. PHP-FPM checks its configuration settings to determine how to handle the incoming request. This includes settings such as the number of worker processes, maximum execution time, and memory limits.<\/p>\n\n\n\n<p><strong>Worker Processes<\/strong><\/p>\n\n\n\n<p>The optimal number of worker processes depends on factors such as server resources, expected traffic, and the nature of the PHP application. Adjusting this value requires careful monitoring and performance testing to ensure efficient resource utilization.\u00a0Assuming an average memory consumption of 64MB per worker, the following matrix can be used as a baseline configuration.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td rowspan=\"2\"><strong>FPM Worker Matrix<\/strong><\/td><td colspan=\"9\"><strong>Total System RAM (MB)<\/strong><\/td><\/tr><tr><td>512 MB<\/td><td>1024 MB<\/td><td>2048 MB<\/td><td>3072 MB<\/td><td>4096 MB<\/td><td>6144 MB<\/td><td>8192 MB<\/td><td>16384 MB<\/td><td>32768 MB<\/td><\/tr><tr><td>pm.max_children<\/td><td>3<\/td><td>6<\/td><td>10<\/td><td>15<\/td><td>20<\/td><td>40<\/td><td>60<\/td><td>80<\/td><td>120<\/td><\/tr><tr><td>pm.min_spare_servers<\/td><td>1<\/td><td>2<\/td><td>3<\/td><td>5<\/td><td>7<\/td><td>13<\/td><td>20<\/td><td>27<\/td><td>40<\/td><\/tr><tr><td>pm.max_spare_servers<\/td><td>3<\/td><td>6<\/td><td>10<\/td><td>15<\/td><td>20<\/td><td>40<\/td><td>60<\/td><td>80<\/td><td>120<\/td><\/tr><tr><td>pm.start_servers<\/td><td>1<\/td><td>2<\/td><td>3<\/td><td>5<\/td><td>7<\/td><td>13<\/td><td>20<\/td><td>27<\/td><td>40<\/td><\/tr><tr><td>Estimated Worker RAM Consumption<\/td><td>192 MB<\/td><td>384 MB<\/td><td>640 MB<\/td><td>960 MB<\/td><td>1280 MB<\/td><td>2562 MB<\/td><td>3842 MB<\/td><td>5120 MB<\/td><td>7668 MB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The optimal number of worker processes depends on factors such as server resources, expected traffic, and the nature of the PHP application. Adjusting this value requires careful monitoring and performance testing to ensure efficient resource utilization.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Install-and-Configure-Redis\">Install and Configure Redis<\/h3>\n\n\n\n<p>Services like Redis and Memcached can significantly improve WordPress performance by caching data in memory and reducing the number of database calls required to serve content. They act as key-value stores that temporarily hold frequently accessed or computationally expensive data, resulting in faster response times and reduced server load. WordPress can be configured to use Redis as an object store by employing specific plugins, such as Redis Object Cache or W3 Total Cache.<\/p>\n\n\n\n<p>Once Redis is installed and configured, you can check the following items to ensure Redis is optimized and operating at its full capacity.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Memory-Usage\" style=\"font-size:24px\">Memory Usage<\/h4>\n\n\n\n<p>Check Redis memory usage with the following command (some output has been omitted):<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>[root@localhost ~]# redis-cli info memorynused_memory:12654264nused_memory_rss:18878464nused_memory_peak:66619048ntotal_system_memory:19327352832nused_memory_lua:37888nmaxmemory:67108864nmaxmemory_policy:allkeys-lrunmem_fragmentation_ratio:1.49nmem_allocator:jemalloc-3.6.0<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">[root@localhost ~]# redis-cli info memorynused_memory:12654264nused_memory_rss:18878464nused_memory_peak:66619048ntotal_system_memory:19327352832nused_memory_lua:37888nmaxmemory:67108864nmaxmemory_policy:allkeys-lrunmem_fragmentation_ratio:<\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">.49nmem_allocator:jemalloc-<\/span><span style=\"color: #79B8FF\">3<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">6<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When <code>used_memory_peak<\/code> is close to <code>maxmemory<\/code>, Redis may not have enough resources to operate to its full capacity. In addition, Redis may be actively evicting keys from the cache to make room for new ones. This is not ideal, and key eviction should be avoided if possible. Increase the <code>maxmemory<\/code> variable in your Redis configuration to resolve this issue.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Key-Eviction\" style=\"font-size:24px\">Key Eviction<\/h4>\n\n\n\n<p>Key eviction is the process of removing old and unused data from the cache to make room for new data. This can be especially problematic for high-traffic websites that rely on Redis caching to improve performance. If your system resources allow for it and the <code>evicted_keys<\/code> count is high, it is again recommended to increase <code>maxmemory<\/code>. The following command will provide information about the number of keys and how many have been evicted.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># redis-cli info stats | grep evicted_keysnevicted_keys:5463nn# redis-cli info keyspacendb0:keys=773,expires=738,avg_ttl=137198<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># redis-cli info stats | grep evicted_keysnevicted_keys:5463nn# redis-cli info keyspacendb0:keys=773,expires=738,avg_ttl=137198<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>By examining these aspects and making appropriate adjustments, you can optimize Redis to significantly enhance your WordPress site\u2019s performance<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Optimize-MariaDB\">Optimize MariaDB<\/h3>\n\n\n\n<p>If object caching like Redis is not available for the WordPress site, requests for database content go straight to the database. First, the database checks its cache to serve the result directly, if possible, and stores it for future use. If caching is unavailable or not allowed, the query proceeds to the database. The database combines cached and uncached information, requesting data from the Operating System. The speed of retrieving the data depends on available RAM and the storage type, with NVMe being the fastest and HDD being the slowest. Simple queries return data immediately to the PHP call, while complex queries requiring temp tables demand more processing time and can slow down the website or cause server issues under high traffic.<\/p>\n\n\n\n<p>Several tuning techniques can improve performance.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Set-the-buffer-pool-size\" style=\"font-size:24px\">Set the buffer pool size<\/h4>\n\n\n\n<p>The buffer pool is the area of memory that MariaDB uses to cache data and indexes. It is important to configure the buffer pool size appropriately based on the amount of available memory and the size of the database. A good rule of thumb is to set the buffer pool size to about 40% of available memory, but keep in mind this percentage is typically applicable only on stand-alone database servers. The buffer pool size can be controlled using the <code>innodb_buffer_pool_size<\/code> variable. See <a href=\"https:\/\/mariadb.com\/kb\/en\/innodb-buffer-pool\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/mariadb.com\/kb\/en\/innodb-buffer-pool\/<\/a> for more information.<\/p>\n\n\n\n<p>One way to analyze buffer pool performance is by observing the <code>innodb_buffer_pool_wait_free<\/code> status variable. If it is increasing, then you don\u2019t have enough buffer pool (or your flushing isn\u2019t occurring frequently enough). In this case, you should set the <code>innodb_buffer_pool_size<\/code> variable higher if your system resources allow for it.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SHOW STATUS LIKE u0022Innodb_buffer_pool_wait_freeu0022;n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002d-+n| Variable_name                | Value |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002d-+n| Innodb_buffer_pool_wait_free | 5464  |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002d-+n1 row in set (0.001 sec)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">SHOW STATUS LIKE u0022Innodb_buffer_pool_wait_freeu0022;n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002d-+n| Variable_name                | Value |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002d-+n| Innodb_buffer_pool_wait_free | <\/span><span style=\"color: #79B8FF\">5464<\/span><span style=\"color: #E1E4E8\">  |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002d-+n1 row in <\/span><span style=\"color: #B392F0\">set<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">001<\/span><span style=\"color: #E1E4E8\"> sec)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Enable-query-cache\" style=\"font-size:24px\">Enable query cache<\/h4>\n\n\n\n<p>Query cache is a feature that stores the results of frequently executed queries in memory, which can significantly improve query performance. It is recommended to enable query cache, but it\u2019s important to note that it may not be effective for all workloads. The query cache can be enabled or disabled using the <code>query_cache_type<\/code> variable. See <a href=\"https:\/\/mariadb.com\/kb\/en\/query-cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/mariadb.com\/kb\/en\/query-cache\/<\/a> for more information.<\/p>\n\n\n\n<p>The SQL server stores stats about the Query Cache.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SHOW STATUS LIKE 'Qcache%';n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n| Variable_name           | Value    |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n| Qcache_free_blocks      | 1158     |n| Qcache_free_memory      | 3760784  |n| Qcache_hits             | 31943398 |n| Qcache_inserts          | 42998029 |n| Qcache_lowmem_prunes    | 34695322 |n| Qcache_not_cached       | 652482   |n| Qcache_queries_in_cache | 4628     |n| Qcache_total_blocks     | 11123    |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">SHOW STATUS LIKE 'Qcache%';n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n| Variable_name           | Value    |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n| Qcache_free_blocks      | <\/span><span style=\"color: #79B8FF\">1158<\/span><span style=\"color: #E1E4E8\">     |n| Qcache_free_memory      | <\/span><span style=\"color: #79B8FF\">3760784<\/span><span style=\"color: #E1E4E8\">  |n| Qcache_hits             | <\/span><span style=\"color: #79B8FF\">31943398<\/span><span style=\"color: #E1E4E8\"> |n| Qcache_inserts          | <\/span><span style=\"color: #79B8FF\">42998029<\/span><span style=\"color: #E1E4E8\"> |n| Qcache_lowmem_prunes    | <\/span><span style=\"color: #79B8FF\">34695322<\/span><span style=\"color: #E1E4E8\"> |n| Qcache_not_cached       | <\/span><span style=\"color: #79B8FF\">652482<\/span><span style=\"color: #E1E4E8\">   |n| Qcache_queries_in_cache | <\/span><span style=\"color: #79B8FF\">4628<\/span><span style=\"color: #E1E4E8\">     |n| Qcache_total_blocks     | <\/span><span style=\"color: #79B8FF\">11123<\/span><span style=\"color: #E1E4E8\">    |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><code>Qcache_inserts<\/code> contains the number of queries added to the query cache, <code>Qcache_hits<\/code> contains the number of queries that have made use of the query cache, while <code>Qcache_lowmem_prunes<\/code> contains the number of queries that were dropped from the cache due to lack of memory.<\/p>\n\n\n\n<p>The above example could indicate a poorly performing cache. More queries have been added, and more queries have been dropped, than have actually been used.<\/p>\n\n\n\n<p><strong>Set In-memory Table Size Limits:<\/strong> As previously mentioned, complex queries will cause the SQL server to create temporary tables. The SQL server will attempt to create tables in memory up to a certain size for performance. It is important to set the max size to an appropriate value to avoid creating on-disk temporary tables. The variables that control this behavior are <code>tmp_table_size<\/code> and <code>max_heap_table_size<\/code>. You can compare the number of internal on-disk temporary tables created to the total number of internal temporary tables created by comparing <code>Created_tmp_disk_tables<\/code> and <code>Created_tmp_tables<\/code> values. See <a href=\"https:\/\/mariadb.com\/kb\/en\/server-system-variables\/#tmp_table_size\" target=\"_blank\" rel=\"noreferrer noopener\">server-system-variables\/#tmp_table_size<\/a> and <a href=\"https:\/\/mariadb.com\/kb\/en\/server-system-variables\/#max_heap_table_size\" target=\"_blank\" rel=\"noreferrer noopener\">server-system-variables\/#max_heap_table_size<\/a> for more information.<\/p>\n\n\n\n<p>You can see if it\u2019s necessary to increase by comparing the status variables <code>Created_tmp_disk_tables<\/code> and <code>Created_tmp_tables<\/code> to see how many temporary tables out of the total created needed to be converted to disk.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>MariaDB [(none)]u003e SHOW STATUS LIKE u0022Created_tmp%u0022;n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002d-+n| Variable_name           | Value |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002d-+n| Created_tmp_disk_tables | 0     |n| Created_tmp_files       | 373   |n| Created_tmp_tables      | 1     |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002d-+n3 rows in set (0.000 sec)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">MariaDB [(none)]u003e SHOW STATUS LIKE u0022Created_tmp%u0022;n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002d-+n| Variable_name           | Value |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002d-+n| Created_tmp_disk_tables | <\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">     |n| Created_tmp_files       | <\/span><span style=\"color: #79B8FF\">373<\/span><span style=\"color: #E1E4E8\">   |n| Created_tmp_tables      | <\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">     |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002d-+n3 rows in <\/span><span style=\"color: #B392F0\">set<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">000<\/span><span style=\"color: #E1E4E8\"> sec)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>In the above example, the SQL server is not having to create temporary tables on disk. This is considered optimal.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Prune-WordPress-Database\" style=\"font-size:24px\">Prune WordPress Database<\/h4>\n\n\n\n<p>Without intervention, WordPress will store junk\/unused data in the database. Over time, this can add up causing database bloat and serious performance lags. This includes items such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Post revisions\n<ul class=\"wp-block-list\">\n<li>Auto-saved drafts<\/li>\n\n\n\n<li>Trashed posts<\/li>\n\n\n\n<li>Trashed comments<\/li>\n\n\n\n<li>Comment spam<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Tables for plugins and themes that are no longer active or installed<\/li>\n\n\n\n<li>Transient records<\/li>\n<\/ul>\n\n\n\n<p>In your wp-config.php file, add or edit the following setting to limit the number of post revisions saved to the database.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">PHP<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>define('WP_POST_REVISIONS', 15);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">define<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #9ECBFF\">'WP_POST_REVISIONS'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #79B8FF\">15<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Many resources exist on the internet for dealing with these items.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Monitor-Performance\" style=\"font-size:24px\">Monitor Performance<\/h4>\n\n\n\n<p>It\u2019s important to regularly monitor the performance of MariaDB and adjust the configurations as necessary. This includes monitoring CPU usage, memory usage, disk I\/O, and query performance. Use a tool like mysqltuner to gain insights on the performance of the SQL installation, or enable Slowquery logging to identify long running queries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Review-Opcache-Hit-Rates-and-Stats\">Review Opcache Hit Rates and Stats<\/h3>\n\n\n\n<p>Opcache provides significant benefits when used with PHP-FPM. When a PHP file has been previously requested and there is enough <code>opcache<\/code> available, the script is already stored in memory. This allows for faster execution as it stands ready to accept data inputs without having to reload the file from disk. It is important to maximize Opcache Hits and minimize misses.<\/p>\n\n\n\n<p>PHP provides several built-in functions to obtain information about OPcache status and configuration like <code>opcache_get_status()<\/code> and <code>opcache_get_configuration()<\/code>. Additionally, there are several web-based monitoring tools to visualize OPcache usage and performance. Some popular options include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>OPcache GUI<\/strong> (<a href=\"https:\/\/github.com\/amnuts\/opcache-gui\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/amnuts\/opcache-gui<\/a>): A single-file PHP script that provides a simple and clean interface to monitor OPcache usage and performance.<\/li>\n\n\n\n<li><strong>OCP<\/strong> (<a href=\"https:\/\/github.com\/ck-on\/ocp\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/ck-on\/ocp<\/a>): A web-based OPcache control panel that allows you to monitor and manage OPcache settings in real-time.<\/li>\n\n\n\n<li><strong>OPcache Status<\/strong> (<a href=\"https:\/\/github.com\/rlerdorf\/opcache-status\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/rlerdorf\/opcache-status<\/a>): A one-page opcache status page for the PHP 5.5 opcode cache.<\/li>\n\n\n\n<li><strong>CacheTool<\/strong> (<a href=\"https:\/\/github.com\/gordalina\/cachetool\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/gordalina\/cachetool<\/a>): CacheTool allows you to work with APCu, OPcache, and the file status cache through the CLI. It will connect to a FastCGI server (like PHP-FPM) and operate on its cache.<\/li>\n<\/ul>\n\n\n\n<p>To use these tools, download and install them on your web server, following the instructions provided in their respective repositories. Keep in mind that some of the information displayed by these tools can reveal information about web server files, or other sensitive information about the website. It is best to keep these interfaces secured by IP, or another form of authentication.<\/p>\n\n\n\n<p>When reviewing Opcache Statistics there are a few key items to look for and assess.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Opcache-Hit-Rate\" style=\"font-size:24px\">Opcache Hit Rate<\/h4>\n\n\n\n<p>The hit rate is the percentage of requests that are being served using cached opcode instead of parsing and compiling the scripts anew.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>[opcache_hit_rate] =u003e 90.64060820636<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">[opcache_hit_rate] =u003e <\/span><span style=\"color: #79B8FF\">90<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">64060820636<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The above hit rate suggests opcache requires more memory or resources to perform to its full capacity. A high hit rate close to 100 indicates that the cache is functioning effectively and providing the desired performance benefits. Monitoring the hit rate can help identify if adjustments to Opcache settings are necessary to improve its efficiency. The next section explains how to adjust the memory allocation for opcache.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Memory-Consumption\" style=\"font-size:24px\">Memory Consumption<\/h4>\n\n\n\n<p>Analyzing memory usage involves checking the amount of memory allocated to the OPCache and how much of it is being utilized.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>[cache_full] =u003e 1n[used_memory] =u003e 134217720n[free_memory] =u003e 8n[wasted_memory] =u003e 0n[current_wasted_percentage] =u003e 0<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">[cache_full] =u003e 1n[used_memory] =u003e 134217720n[free_memory] =u003e 8n[wasted_memory] =u003e 0n[current_wasted_percentage] =u003e <\/span><span style=\"color: #79B8FF\">0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>In the above output, the administrator would want to consider increasing the <code>opcache.memory_consumption<\/code> to a value higher than 128MB as the \u201ccache_full\u201d boolean is true and <code>free_memory<\/code> is at 8 bytes. This information helps determine if there is a need to increase or decrease the memory allocation, based on the size and complexity of your PHP scripts. Ensuring an appropriate memory allocation helps prevent cache evictions and promotes a more efficient use of server resources.<\/p>\n\n\n\n<p>Both <code>num_cached_keys<\/code> and <code>max_cached_keys<\/code> are metrics that provide insight into the number of cached keys (compiled PHP scripts) currently stored in the OPCache (<code>num_cached_keys<\/code>) and the maximum number of cached keys allowed (<code>max_cached_keys<\/code>).<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>[num_cached_scripts] =u003e 4371n[num_cached_keys] =u003e 5597n[max_cached_keys] =u003e 65407n[hits] =u003e 114693n[start_time] =u003e 1683575017n[last_restart_time] =u003e 0n[oom_restarts] =u003e 0n[hash_restarts] =u003e 0n[manual_restarts] =u003e 0n[misses] =u003e 11843n[blacklist_misses] =u003e 0n[blacklist_miss_ratio] =u003e 0n[opcache_hit_rate] =u003e 90.64060820636<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">[num_cached_scripts] =u003e 4371n[num_cached_keys] =u003e 5597n[max_cached_keys] =u003e 65407n[hits] =u003e 114693n[start_time] =u003e 1683575017n[last_restart_time] =u003e 0n[oom_restarts] =u003e 0n[hash_restarts] =u003e 0n[manual_restarts] =u003e 0n[misses] =u003e 11843n[blacklist_misses] =u003e 0n[blacklist_miss_ratio] =u003e 0n[opcache_hit_rate] =u003e <\/span><span style=\"color: #79B8FF\">90<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">64060820636<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>By comparing these values, you can identify if the cache is nearing its capacity or if adjustments are needed to optimize the cache size. If <code>num_cached_keys<\/code> frequently approaches <code>max_cached_keys<\/code>, it may be beneficial to increase the <code>opcache.max_accelerated_files<\/code> value to accommodate more scripts, reducing cache evictions and further improving performance.<\/p>\n\n\n\n<p>Regularly reviewing these key items can help you optimize the OPCache configuration, leading to improved website performance and reduced server resource usage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Utilize-NVMe-Storage\">Utilize NVMe Storage<\/h3>\n\n\n\n<p>As previously mentioned in the database optimization section, NVMe storage helps database server performance by providing significantly faster data access and reduced latency compared to traditional storage solutions. This results in quicker response times and more efficient query processing, leading to improved overall server performance.<\/p>\n\n\n\n<p>NVMe storage improves server performance for WordPress websites in several ways:<\/p>\n\n\n\n<p><strong>Faster Page Load Times<\/strong><\/p>\n\n\n\n<p>With its high-speed data transfer and low latency, NVMe storage allows for quicker access to website files and assets, such as images, stylesheets, and scripts. This leads to faster page load times and a better user experience.<\/p>\n\n\n\n<p><strong>Improved Database Performance<\/strong><\/p>\n\n\n\n<p>The benefits of using NVMe storage when processing database queries can be outlined as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>When processing queries, the database relies on both cached and uncached MySQL data, requiring interaction with the operating system to retrieve the necessary information.<\/li>\n\n\n\n<li>If the operating system has ample RAM, the files needed for a query might already be stored in RAM rather than only being available on a persistent storage device.<\/li>\n\n\n\n<li>In cases where data must be accessed from a storage device, an NVMe drive provides significantly faster data retrieval compared to a SATA SSD, while traditional HDDs are much slower and typically not used in such scenarios anymore.<\/li>\n<\/ol>\n\n\n\n<p>Overall, using NVMe storage greatly enhances database query performance due to its rapid data access capabilities.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Enable-Brotli-and-Gzip-Compression\">Enable Brotli and Gzip Compression<\/h3>\n\n\n\n<p>Compressing web server responses with Brotli or Gzip can significantly improve website performance by reducing the amount of data transferred over the network. This provides a final stage of optimization on the response being returned from the Origin Server. On average, Gzip compression can reduce the size of web content by 60-70%, while Brotli tends to provide even better compression rates, often reducing content size by 70-80%.<\/p>\n\n\n\n<p>Enabling Brotli compression within NGINX is accomplished through the use of the <a href=\"https:\/\/github.com\/google\/ngx_brotli\">brotli nginx module<\/a>. The module can be compiled and installed alongside NGINX and loaded dynamically.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Analyze-a-Server-Response-for-Compression\" style=\"font-size:24px\">Analyze a Server Response for Compression<\/h4>\n\n\n\n<p>To determine if a request response was compressed with Brotli or Gzip compression, you can use Chrome or Firefox Developer Tools to review the Content-Encoding header \u2013 follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the developer tools in your browser:<br>\u2013 In Chrome, press <strong>Ctrl + Shift + I<\/strong> (Windows\/Linux) or <strong>Cmd + Opt + I<\/strong> (Mac).<br>\u2013 In Firefox, press <strong>Ctrl + Shift + I<\/strong> (Windows\/Linux) or <strong>Cmd + Opt + I<\/strong> (Mac).<br>\u2013 Or right click on the webpage and select <strong>Inspect<\/strong>.<\/li>\n\n\n\n<li>Click on the \u201c<strong>Network<\/strong>\u201d tab in the developer tools.<\/li>\n\n\n\n<li>Refresh the webpage or initiate the action you want to analyze. This will populate the network panel with a list of requests made by the browser.<\/li>\n\n\n\n<li>Find the request you\u2019re interested in, such as the main document request or a specific resource like a CSS or JavaScript file. Click on the request to open the detailed view.<\/li>\n\n\n\n<li>In the detailed view, look for the <strong>Headers<\/strong> tab (this should be the default tab in both browsers). Scroll down to the <strong>Response Headers<\/strong> section.<\/li>\n\n\n\n<li>Check the value of the <strong>Content-Encoding<\/strong> header. If the response is compressed with Gzip, it will display <code>gzip<\/code>, and if it\u2019s compressed with Brotli, it will display <code>br<\/code>. If the header is absent or has a different value, the response is not compressed using either of these algorithms.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/sT4zzvipXMpkKD_PnAMFYih7SvNJMTOAy-4UzehaWtK6UfXLwf4LiI-nMKrqeqtz198hmilnJbSYCCiKobMY67XJwXPGRuU2zdCR3f7ffJceZWr1QLrFCFNb5Vz-qsxdRX8_rKO0ah2aAlE6UHY8kBU\" alt=\"Screenshot showing the Server Response for Compression\"><\/figure>\n\n\n\n<p>By examining the <strong>Content-Encoding<\/strong> header in the developer tools, you can quickly determine if a request response was compressed with Brotli or Gzip.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"NGINX-Proxy-Caching\">NGINX Proxy Caching<\/h3>\n\n\n\n<p>Serving requests from the Nginx cache can result in significant performance improvements, as it eliminates the need for the request to traverse the entire stack and access the backend services. This can lead to reduced processing times and improved response times, resulting in a better user experience.<\/p>\n\n\n\n<p>According to benchmarks, serving requests from the Nginx cache can result in a 90% reduction in response times compared to requests that traverse the entire stack. This is due to the caching mechanism\u2019s ability to serve requests directly from memory or disk, reducing the time taken to process the request.<\/p>\n\n\n\n<p>Furthermore, serving requests from the Nginx cache can significantly reduce server load and improve scalability. By reducing the number of requests that must be handled by backend services like PHP-FPM or MySQL, the server can handle more requests concurrently, leading to improved performance and faster response times. This is essential for a high traffic website.<\/p>\n\n\n\n<p>Our UltraStack NGINX configuration adds an <code>X-Proxy-Cache<\/code> HTTP header to responses and the Upstream Cache Status to nginx access log entries. The following three techniques explain how to identify whether the page being received is a cached version served by NGINX:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Using cURL:<\/strong> make a simple GET request to the URL in question, and use grep to check the X-Proxy-Cache header.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>$ curl -is https:\/\/gonintesto.com\/ | grep X-Proxy-CachenX-Proxy-Cache: HIT<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">$ curl -is https:\/\/gonintesto.com\/ | grep X-Proxy-CachenX-Proxy-Cache: HIT<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Using Chrome DevTools:<\/strong> Headers can also be easily inspected using the Chrome DevTools. Use F12 or Ctrl+Shift+I to bring up the DevTools window, then click the Network tab. Tick the box that says \u201cDisable cache\u201d, which will bypass Chrome\u2019s internal cache, then reload the page to capture all of the network information (not disabling Chrome\u2019s cache will allow you to see 304 Not Modified responses for static assets, which shows how the client-side cache is working). The following are the possible values for <strong>$upstream_cache_status<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>MISS<\/strong> \u2013 The response was not found in the cache and so was fetched from an origin server. The response might then have been cached.<\/li>\n\n\n\n<li><strong>BYPASS<\/strong> \u2013 The response was fetched from the origin server instead of served from the cache because the request matched a <code>proxy_cache_bypass<\/code> directive.<\/li>\n\n\n\n<li><strong>EXPIRED<\/strong> \u2013 The entry in the cache has expired. The response contains fresh content from the origin server.<\/li>\n\n\n\n<li><strong>STALE<\/strong> \u2013 The content is stale because the origin server is not responding correctly, and <code>proxy_cache_use_stale<\/code> was configured.<\/li>\n\n\n\n<li><strong>UPDATING<\/strong> \u2013 The content is stale because the entry is currently being updated in response to a previous request, and <code>proxy_cache_use_stale<\/code> updating is configured.<\/li>\n\n\n\n<li><strong>REVALIDATED<\/strong> \u2013 The <code>proxy_cache_revalidate<\/code> directive was enabled and NGINX verified that the current cached content was still valid (<code>If-Modified-Since<\/code> or <code>If-None-Match<\/code>).<\/li>\n\n\n\n<li><strong>HIT<\/strong> \u2013 The response contains valid, fresh content direct from the cache.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Using NGINX access log<\/strong>: Connect to the server using SSH and read the access log with a tail or cat.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>[root@vps87640 ~]# tail -f \/var\/log\/nginx\/access.logn173.231.218.25 - - [16\/Mar\/2023:21:50:43 -0400] u0022GET \/ HTTP\/2.0u0022 200 8205 u0022-u0022 u0022Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/111.0.0.0 Safari\/537.36u0022 [rt=0.000] [proto=HTTP\/2.0:h2] [args=-] [ucs=HIT] [xpc=HIT] [uct=-] [gz=-] [tls=TLSv1.3] [cipher=TLS_AES_256_GCM_SHA384] [scheme=https] gonintesto.com gonintesto.com vps87640.inmotionhosting.com 1638<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">[root@vps87640 ~]# tail -f \/var\/log\/nginx\/access.logn173.<\/span><span style=\"color: #79B8FF\">231<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">218<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">25<\/span><span style=\"color: #E1E4E8\"> - - [<\/span><span style=\"color: #9ECBFF\">16\/Mar\/2023:21:50:43 -0400<\/span><span style=\"color: #E1E4E8\">] u0022GET \/ HTTP\/<\/span><span style=\"color: #79B8FF\">2<\/span><span style=\"color: #E1E4E8\">.0u0022 <\/span><span style=\"color: #79B8FF\">200<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">8205<\/span><span style=\"color: #E1E4E8\"> u0022-u0022 u0022Mozilla\/<\/span><span style=\"color: #79B8FF\">5<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> (X11; Linux x86_64) AppleWebKit\/<\/span><span style=\"color: #79B8FF\">537<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">36<\/span><span style=\"color: #E1E4E8\"> (KHTML, like Gecko) Chrome\/<\/span><span style=\"color: #79B8FF\">111<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> Safari\/<\/span><span style=\"color: #79B8FF\">537<\/span><span style=\"color: #E1E4E8\">.36u0022 [<\/span><span style=\"color: #9ECBFF\">rt=0.000<\/span><span style=\"color: #E1E4E8\">] [proto=HTTP\/<\/span><span style=\"color: #79B8FF\">2<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">:h2] [<\/span><span style=\"color: #9ECBFF\">args=-<\/span><span style=\"color: #E1E4E8\">] [ucs=HIT] [<\/span><span style=\"color: #9ECBFF\">xpc=HIT<\/span><span style=\"color: #E1E4E8\">] [uct=-] [<\/span><span style=\"color: #9ECBFF\">gz=-<\/span><span style=\"color: #E1E4E8\">] [tls=TLSv1.<\/span><span style=\"color: #79B8FF\">3<\/span><span style=\"color: #E1E4E8\">] [<\/span><span style=\"color: #9ECBFF\">cipher=TLS_AES_256_GCM_SHA384<\/span><span style=\"color: #E1E4E8\">] [scheme=https] gonintesto.com gonintesto.com vps87640.inmotionhosting.com <\/span><span style=\"color: #79B8FF\">1638<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The value assigned to <code>ucs=<\/code> (HIT in the above example) or the \u201cUpstream Cache Status\u201d will be one of the above cache statuses.<\/p>\n\n\n\n<p>Using InMotion Central\u2019s Manage Server tools, here is how you would enable NGINX proxy cache on your site:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/tqFXLq4nyIVTH7LtduZb4djftRdhq2F_MPDDklgtAnl4mQXastXD1wQ9tDkaMfeOiIgINdZZy9diYqXvR7VQjNuc1jPIeTs8_T9wliz7z4ITnjjpqsnp3dmIKrA7BjAWzYe87MOnBNSERyHlzAKE24k\" alt=\"Using Platform InMotion\u2019s Manage Server tools, you can enable NGINX proxy cache on your site.\"><\/figure>\n\n\n\n<p>With NGINX proxy cache configured, you may use our <a href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/wordpress-hosting\/central\/servers\/ultrastack-utilities\/\">UltraStack Utilities<\/a> to determine the cache HIT rates for all requests to NGINX.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>CT-92204 \/# usutil nINFO: Parsing log '\/var\/log\/nginx\/access.log' (15.4 MiB)...nnCACHE STATUSn+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n| HIT (Dynamic)  | HIT (Static) | DISABLED+BYPASS |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n| 146323 (51.8%) |   0 (0.0%)   |   4096 (1.4%)   |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n|      HIT       |      MISS      |    BYPASS   |   EXPIRED   | UPDATING |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n| 146323 (51.0%) | 110858 (38.7%) | 4096 (1.4%) | 3095 (1.1%) | 9 (0.0%) |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n| STATIC\/TYPE | STATIC\/PATH | DISABLED |      TOTAL      |n+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n|   0 (0.0%)  |   0 (0.0%)  | 0 (0.0%) | 286663 (100.0%) |n+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">CT-<\/span><span style=\"color: #79B8FF\">92204<\/span><span style=\"color: #E1E4E8\"> \/# usutil nINFO: Parsing log '\/var\/log\/nginx\/access.log' (<\/span><span style=\"color: #79B8FF\">15<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">4<\/span><span style=\"color: #E1E4E8\"> MiB)...nnCACHE STATUSn+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n| HIT (Dynamic)  | HIT (Static) | DISABLED+BYPASS |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n| <\/span><span style=\"color: #79B8FF\">146323<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">51<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">8<\/span><span style=\"color: #E1E4E8\">%) |   <\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%)   |   <\/span><span style=\"color: #79B8FF\">4096<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">4<\/span><span style=\"color: #E1E4E8\">%)   |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n|      HIT       |      MISS      |    BYPASS   |   EXPIRED   | UPDATING |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n| <\/span><span style=\"color: #79B8FF\">146323<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">51<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%) | <\/span><span style=\"color: #79B8FF\">110858<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">38<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">7<\/span><span style=\"color: #E1E4E8\">%) | <\/span><span style=\"color: #79B8FF\">4096<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">4<\/span><span style=\"color: #E1E4E8\">%) | <\/span><span style=\"color: #79B8FF\">3095<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">%) | <\/span><span style=\"color: #79B8FF\">9<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%) |n+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+n+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n| STATIC\/TYPE | STATIC\/PATH | DISABLED |      TOTAL      |n+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+n|   <\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%)  |   <\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%)  | <\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%) | <\/span><span style=\"color: #79B8FF\">286663<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">100<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">%) |n+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002du002du002d-+u002du002du002du002du002du002du002du002du002du002d+u002du002du002du002du002du002du002du002du002du002du002du002du002du002du002du002d-+<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>While this is a tool specific to InMotion Hosting, the information can be retrieved using the third party NGINX module, <a href=\"https:\/\/github.com\/vozlt\/nginx-module-vts\" target=\"_blank\" rel=\"noreferrer noopener\">nginx-module-vts<\/a>.<\/p>\n\n\n\n<p>In summary, using NGINX proxy cache will help drive performance for high traffic websites.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Use-TLSv1.3-and-HTTP2\">Use TLSv1.3 and HTTP\/2<\/h3>\n\n\n\n<p>TLS (Transport Layer Security) is a cryptographic protocol that provides secure communication between web clients and servers. TLS 1.3 is the latest version of the TLS protocol and is designed to provide faster and more secure communication compared to previous versions.<\/p>\n\n\n\n<p>TLS 1.3 also introduces several new features that improve website performance, such as 0-RTT (Zero Round Trip Time) handshakes, which allows returning visitors to establish a secure connection more quickly. Additionally, TLS 1.3 reduces the number of round trips required to establish a secure connection, which reduces latency and improves website performance.<\/p>\n\n\n\n<p>Here are two ways to determine if an NGINX web server is using TLS 1.3:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Using the NGINX access log:<\/strong> In the NGINX access log, look for requests that were made over HTTPS (port 443) and check the TLS protocol version used by the client. If the client and server are using TLS 1.3, the access log will show the protocol version as \u201cTLSv1.3\u201d. For example, a log entry for a request using TLS 1.3 might look like this:<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>1.2.3.4 - - [27\/Mar\/2023:11:12:13 +0000] u0022GET \/ HTTP\/1.1u0022 200 1234 u0022-u0022 u0022Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/123.4.5.6 Safari\/537.36u0022 u0022TLSv1.3u0022.<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">2<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">3<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">4<\/span><span style=\"color: #E1E4E8\"> - - [<\/span><span style=\"color: #9ECBFF\">27\/Mar\/2023:11:12:13 +0000<\/span><span style=\"color: #E1E4E8\">] u0022GET \/ HTTP\/<\/span><span style=\"color: #79B8FF\">1<\/span><span style=\"color: #E1E4E8\">.1u0022 <\/span><span style=\"color: #79B8FF\">200<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">1234<\/span><span style=\"color: #E1E4E8\"> u0022-u0022 u0022Mozilla\/<\/span><span style=\"color: #79B8FF\">5<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\"> (Windows NT <\/span><span style=\"color: #79B8FF\">10<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">0<\/span><span style=\"color: #E1E4E8\">; Win64; x64) AppleWebKit\/<\/span><span style=\"color: #79B8FF\">537<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">36<\/span><span style=\"color: #E1E4E8\"> (KHTML, like Gecko) Chrome\/<\/span><span style=\"color: #79B8FF\">123<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">4<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">5<\/span><span style=\"color: #E1E4E8\">.<\/span><span style=\"color: #79B8FF\">6<\/span><span style=\"color: #E1E4E8\"> Safari\/<\/span><span style=\"color: #79B8FF\">537<\/span><span style=\"color: #E1E4E8\">.36u0022 u0022TLSv1.3u0022.<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><a href=\"https:\/\/nginx.org\/en\/docs\/http\/ngx_http_ssl_module.html#variables\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/nginx.org\/en\/docs\/http\/ngx_http_ssl_module.html#variables<\/a><\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Using an SSL\/TLS Checker:<\/strong> To determine if an NGINX server is using TLS 1.3 using an SSL\/TLS checker, run a test on the server using the checker tool, such as SSL Labs\u2019 SSL Server Test or Qualys SSL Labs SSL Server Test. The tool will analyze the server\u2019s SSL\/TLS configuration and provide information about the TLS protocol being used, including whether TLS 1.3 is enabled. The report generated by the tool will also provide details about the server\u2019s SSL\/TLS configuration, including any issues or vulnerabilities that were found.<\/li>\n<\/ol>\n\n\n\n<p><strong>Configure NGINX:<\/strong> To set the <code>ssl_protocols<\/code> parameter in the NGINX configuration, open the \/etc\/nginx\/nginx.conf file and locate the <code>ssl_protocols<\/code> parameter in the http block, then set the desired SSL\/TLS protocols (e.g., <code>ssl_protocols TLSv1.2 TLSv1.3;<\/code>) and save the file. Finally, test the configuration using <code>nginx -t<\/code> and reload the nginx service using <code>systemctl reload nginx<\/code>.<\/p>\n\n\n\n<p><a href=\"https:\/\/nginx.org\/en\/docs\/http\/ngx_http_ssl_module.html#ssl_protocols\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/nginx.org\/en\/docs\/http\/ngx_http_ssl_module.html#ssl_protocols<\/a><\/p>\n\n\n\n<p>HTTP\/2 is the latest version of the HTTP protocol that powers the web. It is designed to improve website performance by reducing latency and enabling faster page load times. HTTP\/2 achieves this by introducing several new features, including multiplexing, header compression, and server push.<\/p>\n\n\n\n<p>There are a few ways to determine if an NGINX web server is using HTTP\/2:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Check the response headers:<\/strong> When a client makes a request to an NGINX server, the server responds with headers that include information about the protocol being used. If HTTP\/2 is being used, the response headers will include the string \u201cHTTP\/2\u201d in the \u201cserver\u201d field. For example, the \u201cserver\u201d field may read \u201cnginx\/1.20.1 (Ubuntu) HTTP\/2\u201d.<\/li>\n<\/ol>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Use a browser developer tool:<\/strong> Another way to determine if an NGINX server is using HTTP\/2 is to use a browser developer tool, such as Chrome DevTools or Firefox Developer Tools. When the tool is open and a page is loaded from the NGINX server, the \u201cprotocol\u201d column in the network tab will show \u201ch2\u201d if HTTP\/2 is being used. If HTTP\/1.x is being used, the protocol column will show \u201chttp\/1.1\u201d.<\/li>\n<\/ol>\n\n\n\n<p><strong>Configure NGINX:<\/strong> To configure NGINX to use HTTP\/2, you need to ensure that your NGINX version supports HTTP\/2 and then enable it by adding the http2 parameter to the listen directive in the server configuration file, and also include an SSL certificate. For example, the directive <code>listen 443 ssl http2;<\/code> would enable HTTP\/2 over SSL on port 443.<\/p>\n\n\n\n<p><a href=\"http:\/\/nginx.org\/en\/docs\/http\/ngx_http_v2_module.html\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/nginx.org\/en\/docs\/http\/ngx_http_v2_module.html<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Increase-Server-Resources\">Increase Server Resources<\/h3>\n\n\n\n<p>While the exact amount depends on the specific workload of the website, a minimum of 4GB and 2 vCPU cores is recommended when benchmarking your resource needs on a high traffic website. In a high-performance server running MySQL, Redis, PHP-FPM, Apache, and NGINX, having enough RAM is critical to allow each service\u2019s caching techniques to work at their full potential.<\/p>\n\n\n\n<p>These services use RAM to cache frequently accessed data and reduce the time taken to retrieve it from disk or other storage devices. If the server does not have enough RAM, the caching will not be as effective, leading to longer processing times and slower website performance.<\/p>\n\n\n\n<p>For instance, MySQL uses the InnoDB buffer pool to cache frequently accessed data from the database, and Redis uses memory to store frequently accessed data in key-value pairs. PHP-FPM uses opcache to cache PHP scripts, and NGINX uses RAM to cache frequently requested web pages and assets.<\/p>\n\n\n\n<p>If the server does not have sufficient RAM, these caching techniques will not be as effective, and the server may resort to swapping data in and out of slower storage devices, leading to slower response times and reduced server capacity.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Swap-Usage\" style=\"font-size:24px\">Swap Usage<\/h4>\n\n\n\n<p>To determine if a Linux server is swapping, you can use the free command to view the system\u2019s memory usage. If the \u201cSwap\u201d value is greater than zero, it indicates that the server is currently using swap space to store data in memory.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># freen              total        used        free      shared  buff\/cache   availablenMem:        3145728      258388     1784700       36848     1102640     2850492nSwap:             0           0           0<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># freen              total        used        free      shared  buff\/cache   availablenMem:        3145728      258388     1784700       36848     1102640     2850492nSwap:             0           0           0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Additionally, you can use the <code>vmstat<\/code> command to monitor the amount of swapping activity occurring on the server, with the \u201csi\u201d and \u201cso\u201d values indicating the amount of memory being swapped in and out, respectively.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># vmstatnprocs u002du002du002du002du002du002du002du002du002du002d-memoryu002du002du002du002du002du002du002du002du002du002d   u002du002d-swapu002du002d u002du002du002du002d-iou002du002du002du002d -systemu002du002d u002du002du002du002du002du002dcpuu002du002du002du002d-n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa stn 1  0      0 1782348      0 1102660    0    0    16    14    0    0  4  3 93  0  0<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># vmstatnprocs u002du002du002du002du002du002du002du002du002du002d-memoryu002du002du002du002du002du002du002du002du002du002d   u002du002d-swapu002du002d u002du002du002du002d-iou002du002du002du002d -systemu002du002d u002du002du002du002du002du002dcpuu002du002du002du002d-n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa stn 1  0      0 1782348      0 1102660    0    0    16    14    0    0  4  3 93  0  0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The above server does not use Swap and is not swapping.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"OOM-Kills\" style=\"font-size:24px\">OOM Kills<\/h4>\n\n\n\n<p>To determine if a Linux server is experiencing OOM (Out of Memory) kills, you can check the system logs for messages related to OOM events. On most Linux distributions, the system log file is located at \/var\/log\/messages or \/var\/log\/syslog.<\/p>\n\n\n\n<p>To view OOM-related messages, you can search for the keyword \u201cOOM\u201d using the grep command:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Apache<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># grep -i u0022OOMu0022 \/var\/log\/messagesnMay  8 01:22:35 vps53534 kernel: mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=-1000<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># grep -i u0022OOMu0022 \/var\/log\/messagesnMay  8 01:22:35 vps53534 kernel: mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=-1000<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>If OOM events are occurring, you will see log entries that indicate which process or application was killed by the OOM killer. Additionally, you can use tools like <code>dmesg<\/code> and <code>journalctl<\/code> to view kernel messages related to OOM events.<\/p>\n\n\n\n<p>By having enough RAM on the server, each service can utilize caching techniques to their fullest extent, resulting in faster processing times, reduced disk usage, and an overall better user experience.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Caching-Explained-with-Implementation-Techniques\">Caching Explained with Implementation Techniques<\/h2>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Browser-Caching\">Browser Caching<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1860\" height=\"2013\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Browser-Caching.png\" alt=\"Infographic showing how Browser Caching works.\" class=\"wp-image-108262\" style=\"width:631px;height:auto\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Browser-Caching.png 1860w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Browser-Caching-277x300.png 277w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Browser-Caching-946x1024.png 946w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Browser-Caching-768x831.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Ultimate-Guide-Infographics-Browser-Caching-1419x1536.png 1419w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"ETags\" style=\"font-size:24px\">ETags<\/h4>\n\n\n\n<p>The ETag (or entity tag) HTTP response header that web servers and browsers use to determine whether a resource in the browser\u2019s local cache matches the one on the origin server.<\/p>\n\n\n\n<p>When a user revisits a site, one of two things happen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Display content to the user in the browser it if is within the allowable cache freshness time \u2013 Time to Live (TLL).<\/li>\n\n\n\n<li>If content is out of its cache time (TTL expired) then:\n<ul class=\"wp-block-list\">\n<li>If it has an Etag then it will need to send an Etag to the resolved URL to see if it needs to refresh.\n<ul class=\"wp-block-list\">\n<li>If it gets the matching Etag, then it will keep the content it has (no new downloading of content) and set the existing content\u2019s TTL into the future which makes it a viable cached content for the TTL.<\/li>\n\n\n\n<li>If it gets a different Etag then it will trigger a fresh download of the new content.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>If it does not have an Etag then it will send a request out to get the potentially new content and will download that content regardless of if it really is new or not.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>It is important to note that the Etag request and response is much, much smaller than a download of content. As most websites do not change between TTLs, the TTLs need to be low \u201cjust in case\u201d the site does change, therefore the Etag process is much more efficient than TTLs by themselves.<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">How to Check if Your Server Responds is Using ETags<\/h5>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>Open the developer tools in your browser:<br>\u2013 In Chrome, press <strong>Ctrl + Shift + I<\/strong> (Windows\/Linux) or <strong>Cmd + Opt + I<\/strong> (Mac).<br>\u2013 In Firefox, press <strong>Ctrl + Shift + I<\/strong> (Windows\/Linux) or <strong>Cmd + Opt + I<\/strong> (Mac).<br>\u2013 Or right click on the webpage and select <strong>Inspect<\/strong>.<\/li>\n\n\n\n<li>Click on the <strong>Network<\/strong> tab in the developer tools.<\/li>\n\n\n\n<li>Refresh the webpage or initiate the action you want to analyze. This will populate the network panel with a list of requests made by the browser.<\/li>\n\n\n\n<li>Locate a specific resource like a CSS or JavaScript file. Click on the request to open the detailed view.<\/li>\n\n\n\n<li>In the detailed view, look for the <strong>Headers<\/strong> tab (this should be the default tab in both browsers).<\/li>\n\n\n\n<li>Scroll down to the <strong>Response Headers<\/strong> section for the selected file and check for the presence of an Etag.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1012\" height=\"1070\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/etag-network-headers-v3.png\" alt=\"How to Check if Your Server Responds is Using ETags\" class=\"wp-image-108298\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/etag-network-headers-v3.png 1012w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/etag-network-headers-v3-284x300.png 284w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/etag-network-headers-v3-968x1024.png 968w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/etag-network-headers-v3-768x812.png 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:20px\">How to Configure ETags in W3 Total Cache<\/h2>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>In your WordPress admin dashboard, navigate to <strong>Performance &gt; Browser Cache<\/strong>.<\/li>\n\n\n\n<li>Scroll down to the <strong>General<\/strong> section.<\/li>\n\n\n\n<li>Check the box next to the \u201c<strong>Set entity tag (ETag)<\/strong>\u201d setting.<br><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/W3-Total-Cache-Browser-Cache-General-ETag.png\" alt=\"W3 Total Cache - Browser Cache - General - ETag\"><\/li>\n\n\n\n<li>On the same page, using the method above, you can also enable or disable ETags for specific files types, including:<br>\u2013 CSS &amp; JS<br>\u2013 HTML &amp; XML<br>\u2013 Media &amp; Other Files<\/li>\n\n\n\n<li>Press the <strong>Save Settings &amp; Purge Caches<\/strong> button within each respective settings box to save and apply the caching changes immediately.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"font-size:24px\">Time To Live (TTL)<\/h4>\n\n\n\n<p>The Time To Live (TTL) value is the time that an object is stored in a caching system before it\u2019s deleted or refreshed. In the context of CDNs, TTL typically refers to content caching, which is the process of storing a copy of your website resources (e.g., images, text, Javascript) on CDN proxies to improve page load speed and reduce origin server bandwidth consumption.<\/p>\n\n\n\n<p>TTLs are used for caching purposes, and the value is stored in seconds. If the TTL value is set to a low number like 3600 seconds, the data will be stored in the cache for one hour. After one hour, a new version of the data needs to be retrieved.<\/p>\n\n\n\n<p>If the TTL value is set to a high number like 86400 seconds, the data will be stored in the cache for 24 hours.\u00a0<\/p>\n\n\n\n<p>High TTL values cache your data longer, and lessen the frequency for retrieving new data. This gives your website a performance boost by reducing the server\u2019s load, which improves the user\u2019s experience.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">TTL Policies for Static and Dynamic Content<\/h5>\n\n\n\n<p>Before you set your cache TTL policies, you need to consider the types of content you have: static and dynamic.<\/p>\n\n\n\n<p>Static files like images and PDFs do not change frequently, so these should have a long TTL policy. This ensures that these files are cached for a longer period of time.<\/p>\n\n\n\n<p>Dynamic content (e.g. CSS, HTML, database driven content) is updated on a frequent basis, so these resources need to be set accordingly. Dynamic content will have varying TTL policies, whether that\u2019s a few minutes, seconds, or none at all.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">Setting TTL Policies in W3 Total Cache<\/h5>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>In your WordPress admin dashboard, navigate to <strong>Performance &gt; Page Cache<\/strong>.<\/li>\n\n\n\n<li>Scroll down to the <strong>Advanced<\/strong> section.<\/li>\n\n\n\n<li>Locate the \u201c<strong>Maximum lifetime of cache objects:<\/strong>\u201d setting and set the max-age length.<br><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/W3-Total-Cache-Page-Cache-Advanced-TTL.png\" alt=\"W3 Total Cache - Page Cache - Advanced - TTL\"><\/li>\n\n\n\n<li>Scroll down to the bottom and press the <strong>Save Settings &amp; Purge Caches<\/strong> button to save and apply the settings immediately.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"HTTP-Cache-Control-Headers\" style=\"font-size:24px\">HTTP Cache-Control Headers<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cache-Control: Max-Age<\/strong>\n<ul class=\"wp-block-list\">\n<li>The max-age directive specifies the maximum amount of time that a resource can be cached by a client or a proxy server. After expiring, a browser must refresh its version of the resource by sending another request to a server.<\/li>\n\n\n\n<li>cache-control: max-age=3600 means that the returned resource is valid for one hour, after which the browser has to request a newer version.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Cache-Control: No-Cache<\/strong>\n<ul class=\"wp-block-list\">\n<li>The no-cache directive tells a browser or caching server not to use the cached version of a resource, and to request a new version of the resource from the origin server.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Cache-Control: No-Store<\/strong>\n<ul class=\"wp-block-list\">\n<li>The no-store directive tells browsers to never store a copy of the resource and not to keep it in cache. This setting is usually used for sensitive information like credit card numbers, and ensures PCI compliance by not storing this type of data in the cache.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Cache-Control: Public<\/strong>\n<ul class=\"wp-block-list\">\n<li>The public response directive indicates that a resource can be cached by any cache. This directive is useful for resources that change infrequently, and when the resource is intended for public consumption.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Cache-Control: Private<\/strong>\n<ul class=\"wp-block-list\">\n<li>The private response directive indicates that a resource is user specific \u2013 it can still be cached, but only on a client device. For example, a web page response marked as private can be cached by a browser, but not a Content Delivery Network.<\/li>\n\n\n\n<li>This directive can be used in conjunction with the max-age directive to specify how long the resource can be cached before it needs to be revalidated.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">Setting HTTP Cache-Control Headers in W3 Total Cache<\/h5>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>In your WordPress admin dashboard, navigate to <strong>Performance &gt; Browser Cache<\/strong>.<\/li>\n\n\n\n<li>Determine what your Cache-Control policies will be for the following files:<br>\u2013 CSS &amp; JS<br>\u2013 HTML &amp; XML<br>\u2013 Media &amp; Other Files<\/li>\n\n\n\n<li>Locate the <strong>CSS &amp; JS<\/strong> section.<\/li>\n\n\n\n<li>Check the box next to the \u201c<strong>Set cache control header<\/strong>\u201d setting.<\/li>\n\n\n\n<li>Below that option, select the \u201cCache Control policy:\u201d from the selections provided.<br><br><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/W3-Total-Cache-Browser-Cache-CSS-JS.png\" alt=\"W3 Total Cache - Browser Cache - CSS &amp; JS\"><\/li>\n\n\n\n<li>Locate the <strong>HTML &amp; XML<\/strong> section.<\/li>\n\n\n\n<li>Check the box next to the \u201c<strong>Set cache control header<\/strong>\u201d setting.<\/li>\n\n\n\n<li>Below that option, select the \u201cCache Control policy:\u201d from the selections provided.<\/li>\n\n\n\n<li>Locate the <strong>Media &amp; Other Files<\/strong> section.<\/li>\n\n\n\n<li>Check the box next to the \u201c<strong>Set cache control header<\/strong>\u201d setting.<\/li>\n\n\n\n<li>Below that option, select the \u201cCache Control policy:\u201d from the selections provided.<\/li>\n\n\n\n<li>Scroll down to the bottom and press the <strong>Save Settings &amp; Purge Caches<\/strong> button to save and apply the settings immediately.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Cache-Busting\" style=\"font-size:24px\">Cache Busting<\/h4>\n\n\n\n<p>Cache busting is a technique used to force a browser or caching server to retrieve a new version of a resource, rather than using the cached version. One way to do this is by using a query parameter, such as a timestamp or a version number, in the URL of the resource.<\/p>\n\n\n\n<p>For example, instead of requesting a resource at the URL https:\/\/www.example.com\/styles.css, a cache-busting URL would look like https:\/\/www.example.com\/styles.css?v=1234, where v=1234 is the query parameter. This query parameter can be a timestamp or a version number, and it will be ignored by the server, but it will force the browser or caching server to treat the request as a new request, rather than using the cached version of the resource.<\/p>\n\n\n\n<p>This technique is often used for static resources like stylesheets, scripts, images and so on, that are intended to be cached, but that may need to be updated frequently. By appending a query parameter to the URL, a new version of the resource will be retrieved each time the query parameter changes.<\/p>\n\n\n\n<p>This technique is commonly used to ensure that the client gets the latest version of the resources after they are updated on the server side.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"font-size:20px\">Enable Cache Busting in W3 Total Cache<\/h5>\n\n\n\n<p>Enabling Cache Busting in W3 Total Cache is done by selecting the option \u201cPrevent caching of objects after settings change\u201d under <strong>Performance &gt; Browser Cache<\/strong>. This adds a random string at the end of static asset URLs.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/3IrnoLsqWhFlIj03z0v-kZT-nj0kDFRLelK0D514Rt_K4397aujUNupnhENsgJpaZEttpyDiXBz1PCIZkczMfJy1IHKv6dP0Q3fEJgHU0krJhe0J_tKiZgiR3LUPEnxSMfr9It2zABvQrGungHnmb6w\" alt=\"Prevent caching of objects after settings change\"><\/figure>\n\n\n\n<p>Whenever a change is made to a static asset, busting cache is done by navigating to the Browser Cache page under performance, and clicking \u201cUpdate Media Query String\u201d at top. This regenerates a new string that appends to the static asset URL, which will not match the URL of the stored version in your browser so it will show the updated version to the visitor.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/6p2trkp7Qs7FWLxCcWwP68vf171XjBZ48QugQMGQ5hkEh7vSsXaR6i5mRBLiwF2bQm5zyZrCr2XyOA6iIOrAn0zxG4kglV0kmzbDf7gND6Qo35AzfJUPFGtQ5Vc-N5GLGUuFOU97g2bWLs1Y2otYnk8\" alt=\"Update Media Query String\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Proxy-Caching-CDNs\">Proxy Caching \/ CDNs<\/h3>\n\n\n\n<p>Cache storage is a finite resource, so every bit of storage performance matters. Caching at proxy servers is one of the ways to reduce the response time perceived by World Wide Web users.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CDN level \/ edge caching<\/li>\n\n\n\n<li>Server (NGINX) Proxy Cache<\/li>\n\n\n\n<li>WordPress Plugins \/ Application level caching<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Cache-Eviction-Policies\" style=\"font-size:24px\">Cache Eviction Policies<\/h4>\n\n\n\n<p>Cache replacement algorithms play a central role in reducing response times by selecting specific website assets for caching, so that a given performance metric is maximized. They do this by deciding which objects can stay and which objects should be evicted the next time the website is accessed.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Least Recently Used (LRU): <\/strong>Replaces the cache line that has been in the cache the longest with no references to it.<\/li>\n\n\n\n<li><strong>First-In First-Out (FICO): <\/strong>Replaces the cache line that has been in the cache the longest.<\/li>\n\n\n\n<li><strong>Least Frequently Used (LFU): <\/strong>Replaces the cache line that has experienced the fewest references.<\/li>\n\n\n\n<li><strong>Random:<\/strong> Pick a line at random from the candidate lines.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Caching-Storage-Engines\">Caching Storage Engines<\/h3>\n\n\n\n<p>For the different types of caching and storage engines available in the W3TC plugin. The following list outlines those choices for you.<\/p>\n\n\n\n<p class=\"alert alert-info\"><strong>Note:<\/strong> In order for some of these services to be available to your WordPress installation, they must be installed on the server in conjunction with the PHP extension or module needed for the service to function.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"font-size:24px\">Disk-Based Methods with W3 Total Cache<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Disk: Basic<\/strong> is the option that invokes a PHP script (advanced-cache.php) that does the hard caching job.<\/li>\n\n\n\n<li><strong>Disk: Enhanced<\/strong> is the more efficient way of caching. This method does not invoke PHP scripts but solves the caching task in a much more elegant way by creating a static version of a web page and serves that instead of the dynamic version of your website via rewrites in the .htaccess file. This approach lets your web server deal with a static (cached) version of your web pages directly. Some tests reveal that the Enhanced method makes a website up to 2.5 times faster when compared to the Basic method.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"font-size:24px\">RAM Based Methods with W3 Total Cache<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Memcached<\/strong> is a high-performance, distributed memory object caching system meant to speed up dynamic web applications by alleviating database load. It provides an in-memory key-value store for small chunks of arbitrary data (strings, objects) from the results of database calls, API calls, or page rendering.\n<ul class=\"wp-block-list\">\n<li>Memcached is ideal for relatively small and static data, and as a result may be more efficient than Redis in smaller data sets. It is also multi-threaded, which may be a benefit when using a VPS or Dedicated Server with a large resource pool.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Redis <\/strong>is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis data structures resolve very complex programming problems with simple commands executed within the data store, reducing coding effort, increasing throughput, and reducing latency.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"font-size:24px\">OPcode Based Methods with W3 Total Cache<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Alternative PHP Cache (APC \/ APCu)<\/strong> which provides in-memory Opcode caching and a key-value store for looking up cached items. This is largely deprecated in favor of modern Opcode Caching mechanisms, as APC is not supported in the PHP 7.x branch.<\/li>\n\n\n\n<li><strong>APCu <\/strong>is similar to APC, though in order to support modern variants of PHP it is stripped of Opcode Caching and only provides the in-memory key-value store mechanisms. When paired with modern Opcode Caching mechanisms it can provide the functionality originally provided by APC, though it should only be used when you require having a limited cache size.<\/li>\n\n\n\n<li><strong>eAccelerator<\/strong> is an in-memory Opcode caching solution that supports the PHP 4.x and 5.x major versions. This is largely deprecated in favor of modern Opcode Caching mechanisms, as eAccelerator is not supported in the PHP 7.x branch.<\/li>\n\n\n\n<li><strong>XCache<\/strong> is an in-memory Opcode caching solution that supports up to the PHP 5.6 release. This is largely deprecated in favor of modern Opcode Caching mechanisms, as XCache is not supported in the PHP 7.x branch.<\/li>\n\n\n\n<li><strong>WinCache<\/strong> (Recommended for Windows-based Environments) is an extension for Microsoft IIS which provides in-memory Opcode caching and currently supports up to IIS 10 as of 04\/30\/2019. Check the official Microsoft product page for the latest information.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Page-Caching\">Page Caching<\/h3>\n\n\n\n<p>Page caching refers to caching the content of a whole page on the server side. Later when the same page is requested again, its content will be served from the cache instead of regenerating it from scratch.<\/p>\n\n\n\n<p>A page from a WordPress website contains dynamic content: PHP scripts, JavaScript, and SQL queries. Executing this dynamic content is very resource heavy and takes a lot of time. Page caching allows for forming a part of the web page into static HTML. With page cache enabled, website content displays faster for a visitor with less load to the server. It\u2019s one of the most efficient ways to improve your website performance.<\/p>\n\n\n\n<p class=\"alert alert-success\"><strong>Tip:<\/strong> The <strong>Disk: Enhanced<\/strong> caching method is the recommended storage engine and the most reliable option for page caching for most types of hosting plans.<\/p>\n\n\n\n<p>Disk: Enhanced is recommended because it allows the request to be redirected at the web server level, and the request does not have to use PHP. This allows the page cache to be served much faster, and is the ideal setup for using page cache.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Object-Caching\">Object Caching<\/h3>\n\n\n\n<p>Object caching is the process that involves storing database queries to serve a specific piece of data on the subsequent server request. As a result, there will be fewer queries sent to the database and the result is your website will load much faster.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"WordPress-Object-Cache\" style=\"font-size:24px\">WordPress Object Cache<\/h4>\n\n\n\n<p>The idea of an Object Cache is that WordPress Core, themes, and plugins may store some data that is frequently accessed and rarely changed in an object store. This is so these objects will not have to be retrieved and processed on each request.<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_object_cache\/\" target=\"_blank\" rel=\"noreferrer noopener\">wp_object_cache<\/a> is WordPress\u2019 class for caching data, and by default, the object cache is non-persistent. This means that data stored in the cache resides in memory only and only for the duration of the request. Cached data will not be stored persistently across page loads unless you install a persistent caching plugin.\u00a0<\/p>\n\n\n\n<p>Ultimately, Object Caching will reduce the total number of database queries required for each page load. When the CPU does not have to rebuild these blocks of data, your response time will decrease.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/KLcTkeRkzc_JSOwSXB5ZV_spuhplhlUot3SFk5_NWX2JpL8jalqaO4Y5XWYNFdcKu5h2MZNXluZ_j38zaKcfU0SJhGbEd8D00UKsBM_2GBIhqdghoPZchkj1EvmgygsPUfjQw3m5G6O6JOwdlNsSMdg\" alt=\"WordPress Object Cache using W3 Total Cache\"><\/figure>\n\n\n\n<p class=\"alert alert-success\"><strong>Tip:<\/strong> The <strong>Redis<\/strong> caching method is the recommended storage engine and the most reliable option for object caching if you have a VPS or Dedicated Server. For shared hosting, Disk may be your only option in some cases.<\/p>\n\n\n\n<p><strong>Store Transients in the Database with W3 Total Cache<\/strong><\/p>\n\n\n\n<p>Transients are the data that exists in memory (in cache) for current WordPress activity. It makes the website faster. However, when the cache is cleared or expires, the heavy numerous database requests should run again to re-fill the cache. In order to avoid these resource-intensive database requests, it\u2019s recommended to save transient data into the database. It results in much less database load when the cache is cleared or expires.<\/p>\n\n\n\n<p>In W3 Total Cache, there is an option to store transients in the database. This setting can be enabled in one of two areas: Object Caching Advanced Settings or by navigating to <strong>Performance &gt; Object Cache<\/strong>.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/Store-Transients-in-Database.png\" alt=\"Store Transients in the Database with W3 Total Cache\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Database-Caching\">Database Caching<\/h3>\n\n\n\n<p>Database caching will store the results of MySQL database queries, in theory making it faster to return a response. While this does sound like it would be useful, it is recommended that you disable it, and use <strong>Object Cache<\/strong> via Redis or Memcache instead.<\/p>\n\n\n\n<p class=\"alert alert-warning\"><strong>Tip:<\/strong> Database caching is not recommended if you are hosting on SSD or NVME drives.<\/p>\n\n\n<p>\u00a0<\/p>\n<p class=\"btn-secondary-alt\">Back to Top<\/p>\n<p>\u00a0<\/p>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Optimizing-the-WordPress-Application\">Optimizing the WordPress Application<\/h2>\n\n\n\n<p>Once the server and database have been tuned for performance, the next step is to ensure the application is optimized for performance. This can be done by leveraging techniques designed to deliver assets more efficiently, or remove any unnecessary data from them resulting in faster transfers. The following are some of the most effective techniques you can use when it comes to optimizing your WordPress site for speed, but it is not an exhaustive list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-large-font-size\" id=\"Improve-Core-Web-Vitals-WordPress\">Top 10 Techniques to Improve Core Web Vitals for WordPress<\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"jetpack-video-wrapper\"><div class=\"yt-vg9-W4AWI58\">\n\t<a class=\"play-video-vg9-W4AWI58\" style=\"position: relative; display: flex; flex-wrap: wrap; align-items: center; cursor: pointer;\">\n\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.ytimg.com\/vi_webp\/vg9-W4AWI58\/maxresdefault.webp\" width=\"1280\" height=\"720\" alt=\"Top 10 Techniques to Improve Core Web Vitals for WordPress\" style=\"width: 100%; height: auto;\">\n\t\t<span class=\"fa fa-imh-play-circle imh-ds-icon play-circle\" style=\"position: absolute; display:block; font-size:150px; color: #c52228; opacity:0;\"><\/span>\n\t<\/a>\n<\/div><\/div>\n<\/div><\/figure>\n\n\n\n<p>When focusing on page and website performance, there are some essential tasks you can complete to help you achieve the performance results you are looking for. These tasks include configuring caching, following best practices for elements that can introduce layout shifts, and adjusting your assets to ensure they are configured for the fastest possible delivery to your visitors.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Dynamic-Page-Caching\" style=\"font-size:24px\">1. Page Caching<\/h4>\n\n\n\n<p>WordPress is a dynamic program by default, so the easiest way to speed things up is to create a static version of your website pages, and use redirects to serve those cached files instead of calculating the result again with PHP and MySQL. This cache can be stored on the disk, in the server\u2019s RAM or if you are using a CDN, on a Point of Presence or Edge Server.\u00a0<\/p>\n\n\n\n<p>If you are storing the page cache on the web server, then it is recommended to use Disk: Enhanced storage, so the web server redirects can serve the cache prior to the request reaching PHP, essentially making the site load faster by using these static files instead of recreating them with queries and calculations.<\/p>\n\n\n\n<p>Storing page cache on a CDN at the edge is a practice known as Full Site Delivery or Acceleration, where the website is served by sending a cached version of the website from a geographic location near the visitor, as opposed to the request reaching out to the origin server where the data lives. This removes location introduced latency from the equation, making websites much faster for all of your visitors.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Redis-Object-Caching\" style=\"font-size:24px\">2. Object Caching with Redis<\/h4>\n\n\n\n<p>By default, the object cache in WordPress is not persistent. This means that data stored in the cache resides in memory for the duration of the request and is removed after the response is delivered. To store these cached objects for reuse, you can use a plugin that connects the WordPress cache to Redis, a RAM based service that is used for persistent object storage.<\/p>\n\n\n\n<p>W3 Total Cache will allow you to use object caching with Redis. Redis stores the data as keys in the web server\u2019s memory, which allows for retrieval of the data to happen much faster than the WordPress method, which caches those objects to the options table in the database by default.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Leveraging-Common-UX-Patterns\" style=\"font-size:24px\">3. Leveraging Common UX Patterns<\/h4>\n\n\n\n<p>When adding elements such as fonts, carousels and banners to your website, you want to ensure you are following best practices. These types of elements can have a negative impact on Core Web Vitals if not implemented correctly.\u00a0<\/p>\n\n\n\n<p>A great example of this is not explicitly setting proper placeholders or dimensions for images, videos, iframes or other similar embedded content throughout your page. When the content is loaded, this can cause layout shift, and Core Web Vitals has very specific metrics, as a moving page can create a bad user experience for your visitor.<\/p>\n\n\n\n<p>Loading custom fonts on your website is another example where things can go wrong. Adding them incorrectly can delay the text rendering or even cause layout shifts. Typically, your browser will delay displaying text until the font is loaded, which can also impact your FCP or LCP. If the text does load prior to your web font, and they are different sizes, layout shifts will occur and directly impact your CLS score.<\/p>\n\n\n\n<p>Using <a href=\"https:\/\/web.dev\/patterns\/web-vitals-patterns\/\" target=\"_blank\" rel=\"noopener\">best practices for these and other common UX elements<\/a> is recommended to avoid negative impacts to your page performance.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Asset-Minification\" style=\"font-size:24px\">4. Asset Minification<\/h4>\n\n\n\n<p>When developing a website, most programmers tend to use spacing and comments to make code readable for both themselves and others. Minification is a technique used to reduce load times on a website by removing unnecessary characters and comments from the code for faster delivery and rendering. This technique can be used on HTML, CSS and Javascript files and code, and can dramatically improve your site\u2019s performance.<\/p>\n\n\n\n<p>To minify your assets with W3 Total Cache, you will need to enable it in General Settings. There is an automatic mode which attempts to handle the heavy lifting for you, but if you have issues with it you will need to enable manual mode and add the assets you wish to be minified yourself under the minify page.<\/p>\n\n\n\n<p>There is a help wizard for setting up minify, which you can use to specify the template to use when loading the asset, or choose to load the asset globally. Using this method you can create page templates and page specific assets that only load the necessary files for the page being requested to fine tune your application for performance.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Concatenation\" style=\"font-size:24px\">5. Concatenation<\/h4>\n\n\n\n<p>The term concatenation refers to the action of linking things together in a series. In the context of website performance, this means combining multiple CSS and Javascript files into a few files, to deliver the assets the browser needs faster with less requests.<\/p>\n\n\n\n<p>In W3 Total Cache, concatenating files is an option in General Settings, under minify. Checking the box will allow you to combine the asset files into one of 3 different files in the DOM: One in the head, one in the body or one at the footer before the closing of the document.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Eliminate-Render-Blocking-Resources\" style=\"font-size:24px\">6. Eliminate Render Blocking Resources<\/h4>\n\n\n\n<p>Render-blocking resources is essentially code in your website files, usually CSS and JavaScript, that prevents a web page from loading quickly. To ensure your site loads as efficiently as possible, you can specify attributes that tell the browser how to download the code in relation to the other site assets.\u00a0<\/p>\n\n\n\n<p>When concatenating and minifying files using W3 Total Cache, you will also have the option of embedding them before the close of the document\u2019s <code>&lt;\/head&gt;<\/code> tag, or after the <code>&lt;body&gt;<\/code> tag. To improve performance, you have the option of setting \u201crel\u201d attributes for the assets such as async or defer, which will tell the browser when and how to load the file.<\/p>\n\n\n\n<p><strong>Using Minify with W3 Total Cache<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/W3-Total-Cache-Help-Wizard.png\" alt=\"Using Minify with W3 Total Cache\"><\/figure>\n\n\n\n<p>The Minify Help wizard in Total Cache will allow you to specify which JS and CSS files load by template, allowing you to have fine tune control over what assets load when and where. To use the wizard, you must set Minify to Manual Mode in General Settings, then visit the Minify Page to launch the Help Wizard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/12\/W3-Total-Cache-Minify-Help-Wizard.png\" alt=\"Minify Help wizard in Total Cache\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Preconnect-Prefetch-DNS-Hints\" style=\"font-size:24px\">7. Preconnect &amp; Prefetch DNS Hints<\/h4>\n\n\n\n<p>If your site is using multiple 3rd party scripts, the location those scripts are hosted on will be considered a cross-origin domain. That 3rd party domain will need to resolve to an IP address for the browser to download the file and complete the request.<\/p>\n\n\n\n<p>The time it takes for this DNS resolution to take place can introduce latency into the page load, and using preconnect and prefetch will instruct the browser to handle this prior to fetching the asset. This can help remove the latency introduced by resolving a large number of DNS requests for assets in the background.\u00a0<\/p>\n\n\n\n<p>Using dns-prefetch and preconnect links will help your page load faster by performing these operations for later use. The dns-prefetch will do a DNS lookup, while preconnect will establish the connection to the server. This connection established will also include a TLS handshake, if served over HTTPS.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">HTML<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>u0026lt;link rel=u0022preconnectu0022 href=u0022https:\/\/fonts.googleapis.com\/u0022 crossorigin \/u003enu0026lt;link rel=u0022dns-prefetchu0022 href=u0022https:\/\/fonts.googleapis.com\/u0022 \/u003e<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">u0026lt;link rel=u0022preconnectu0022 href=u0022https:\/\/fonts.googleapis.com\/u0022 crossorigin \/u003enu0026lt;link rel=u0022dns-prefetchu0022 href=u0022https:\/\/fonts.googleapis.com\/u0022 \/u003e<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The preconnect hint should be used sparingly, and only for the most critical assets being used in the viewport during the initial page load. For non critical assets, using only the dns-prefetch hint is recommended.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Image-Optimization\" style=\"font-size:24px\">8. Image Optimization<\/h4>\n\n\n\n<p>Image Optimization refers to the practice of a website delivering the highest quality image with the right format, resolution and dimensions for the device and viewport accessing them. This is done with the intent of keeping the file size as small as possible. There are several layers when dealing with optimizing your images, including removing metadata, converting to a different format, resizing and lazy loading.<\/p>\n\n\n\n<p><strong>Removing Image Metadata<\/strong><\/p>\n\n\n\n<p>One of the ways to reduce an image\u2019s file size is to remove any metadata attached to the file. This data can include information about the camera used to take the picture, GPS coordinates, the files owner, comments, a thumbnail, date, description, keywords and much more.\u00a0<\/p>\n\n\n\n<p>There are several types of metadata that can be added to images, including EXIF, IPTC, XMP. Removing this data will help to decrease the file size of the image. An added benefit is that removing metadata keeps these details from being publicly shared.<\/p>\n\n\n\n<p><strong>Image Formats (WebP)<\/strong><\/p>\n\n\n\n<p>WebP is a compression format for images developed by Google. When optimizing your images for speed, using WebP is the recommended format for websites. Most modern browsers now support the WebP image format. There are many WordPress plugins that offer this type of image conversion and most even assist with redirects to automate the process and a fallback option in case the browser does not support the WebP format.\u00a0<\/p>\n\n\n\n<p><strong>Dynamic Image Resizing<\/strong><\/p>\n\n\n\n<p>When different devices are used to access your web page, the image size needed will vary depending on the visitors viewport. Dynamic image sizes can be used to make each of these devices load the image with a size tailored specifically to the viewport where the site is being rendered.<\/p>\n\n\n\n<p>A great example of this would be the hero image on your website. While a desktop would likely need the full size version of this image, the narrow viewport of a mobile device may only need an image that is 20% of that size. Providing the browser with the smaller size would reduce the time it needs to download the file, and display it.\u00a0<\/p>\n\n\n\n<p>There are many WordPress plugins and CDN Providers that offer dynamic resizing for images. The solution you choose should be based on your audience. If your visitors are mostly local and your traffic is not high volume, a CDN\u2019s cost for this service may outweigh the benefits to you, so using a WordPress plugin may be your best option.<\/p>\n\n\n\n<p><strong>Lazy Loading Images<\/strong><\/p>\n\n\n\n<p>Lazy Loading is the practice of identifying non critical assets, and ensuring they only load later as needed to render the page in the browser. In the context of images, lazy loading is usually based on a user interaction such as scrolling, and loads the images needed as a user gets near them.<\/p>\n\n\n\n<p>Lazy Loading allows the first render to happen faster, as it instructs the browser to only load the critical resources needed to display what is being rendered in the viewport. Then, as you scroll, the application can detect when resources (such as images or embeds are needed), and initialize the download.<\/p>\n\n\n\n<p>W3 Total Cache offers lazy loading for images. And upgrading to Pro gives you the ability to lazy load Google maps.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Image-Facades\" style=\"font-size:24px\">9. Using Image Facades for Interactive Elements<\/h4>\n\n\n\n<p>One of the biggest issues authors run across is having multiple video embeds from providers such as Youtube or Vimeo. Loading these videos will force your site to do DNS lookups, make connections to these 3rd party servers in the background, and download the elements needed to render the content.<\/p>\n\n\n\n<p>Providing an image that is served from your site\u2019s domain as an interaction point to trigger loading these types of content embeds can save you precious time rendering your web page. It also saves the user from downloading Javascript and CSS for an element they are not going to use, as the video does not render unless the user specifically clicks on the image anchor link to trigger it.<\/p>\n\n\n\n<p>This is also true for other interactive elements such as chat embeds or other interactive elements that are not hosted on your server and are being served to your visitor from a remote service.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Disable-Plugins-Targeting\" style=\"font-size:24px\">10. Disable Plugins on Pages Where Not Needed<\/h4>\n\n\n\n<p>After you have optimized your site\u2019s configuration, it is best practice to test your individual pages and disable any assets that are not needed on them. This can be done by using WordPress functions to deregister and dequeue any scripts or styles loaded by plugins not used, or there are some WordPress plugins that will help you do this from within the interface.<\/p>\n\n\n\n<p>To accomplish this, you will need to measure each individual page and use the Network tab within the Inspector to determine what assets are loading per page. Once you have this information, you can determine if the assets are needed, or loading unnecessarily on a page.<\/p>\n\n\n\n<p>This is a common issue with plugins that have front end output, and it can be easily remedied by identifying the pages where the asset is needed for the plugin to function, then using a WordPress function with conditional logic, to ensure those assets are only loaded on an \u201cas needed\u201d basis.<\/p>\n\n\n\n<p>This example is for a plugin that is used on 3 pages \u2013 About Us, Contact and Management. Targeting any page that is not one of these by using a ! in front of the is_page conditional, we can use an if else statement to remove the scripts or styles. If this condition is not met, then normal operations would happen and the plugin assets would be included.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">PHP<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>if ( !is_page( array( 'about-us', 'contact', 'management' ) ) ) {n\/\/ either in about us, contact, or management, do nothingn    } else {n    \/\/ Deregister scripts and stylesn    wp_dequeue_style( 'handle' );n    we_dequeue_script( 'handle' );n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">if<\/span><span style=\"color: #E1E4E8\"> ( <\/span><span style=\"color: #F97583\">!<\/span><span style=\"color: #B392F0\">is_page<\/span><span style=\"color: #E1E4E8\">( <\/span><span style=\"color: #79B8FF\">array<\/span><span style=\"color: #E1E4E8\">( <\/span><span style=\"color: #9ECBFF\">'about-us'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'contact'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'management'<\/span><span style=\"color: #E1E4E8\"> ) ) ) {<\/span><span style=\"color: #79B8FF\">n<\/span><span style=\"color: #6A737D\">\/\/ either in about us, contact, or management, do nothingn    } else {n    \/\/ Deregister scripts and stylesn    wp_dequeue_style( 'handle' );n    we_dequeue_script( 'handle' );n}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>You can also disable the entire plugin if it is not one of the pages in the array using the following code snippet that fires on the wp action hook.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">PHP<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>function disable_plugin() { nif ( !is_page( array ( 'about-us', 'contact', 'management' ) ) ) { ndeactivate_plugins('plugin\/main-file-plugin.php'); n     } n} nadd_action('wp', 'disable_plugin');<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">function<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">disable_plugin<\/span><span style=\"color: #E1E4E8\">() { <\/span><span style=\"color: #B392F0\">nif<\/span><span style=\"color: #E1E4E8\"> ( <\/span><span style=\"color: #F97583\">!<\/span><span style=\"color: #B392F0\">is_page<\/span><span style=\"color: #E1E4E8\">( <\/span><span style=\"color: #79B8FF\">array<\/span><span style=\"color: #E1E4E8\"> ( <\/span><span style=\"color: #9ECBFF\">'about-us'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'contact'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'management'<\/span><span style=\"color: #E1E4E8\"> ) ) ) { <\/span><span style=\"color: #B392F0\">ndeactivate_plugins<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #9ECBFF\">'plugin\/main-file-plugin.php'<\/span><span style=\"color: #E1E4E8\">); <\/span><span style=\"color: #79B8FF\">n<\/span><span style=\"color: #E1E4E8\">     } <\/span><span style=\"color: #79B8FF\">n<\/span><span style=\"color: #E1E4E8\">} <\/span><span style=\"color: #B392F0\">nadd_action<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #9ECBFF\">'wp'<\/span><span style=\"color: #E1E4E8\">, <\/span><span style=\"color: #9ECBFF\">'disable_plugin'<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"font-size:24px\">Still Not Getting Your Desired Results?\u00a0<\/h4>\n\n\n\n<p>When you have performed every optimization under the sun, and you are still not hitting the speeds you want to have, there is another option to pursue. Revisit your Theme choice.\u00a0<\/p>\n\n\n\n<p>When searching for a theme, opt for a lightweight and well-coded WordPress theme to ensure faster loading times. Avoid themes with excessive features and unneeded complex design elements that can slow down your site.<\/p>\n\n\n\n<p>A lot of websites will have a custom theme developed specifically for their site\u2019s purpose, which only includes the things their site needs. When performance is a goal you are chasing, you can get exactly what you need by building your WordPress theme from the ground up, as opposed to the included kitchen sink approach that you get with a lot of commercial themes.<\/p>\n\n\n<p>\u00a0<\/p>\n<p class=\"btn-secondary-alt\">Back to Top<\/p>\n<p>\u00a0<\/p>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Server-Monitoring-and-Adjusting-Performance\">Server Monitoring &amp; Adjusting Performance<\/h2>\n\n\n\n<p>Ensuring optimal performance for your server and WordPress website is crucial for providing a smooth and responsive user experience. However, performance can degrade over time due to changes in content and application.\u00a0<\/p>\n\n\n\n<p>In this section, we will explore the importance of monitoring and adjustment strategies to maintain peak performance. We will delve into key areas such as memory usage on the server, caching statistics review, periodic performance testing, analytics, and uptime monitoring. Let\u2019s dive in!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Monitoring-Regimen-for-Continuous-Performance\" style=\"font-size:24px\">Monitoring Regimen for Continuous Performance<\/h3>\n\n\n\n<p>To maintain performance over time, it\u2019s essential to establish a monitoring regimen. Regularly monitor and track performance metrics while considering content and application changes. By doing so, you can identify potential bottlenecks and take proactive measures to optimize performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Server-Memory-Usage\" style=\"font-size:24px\">Memory Usage on the Server<\/h3>\n\n\n\n<p>One critical aspect of server performance is memory usage. Keep a close eye on memory allocation and usage, particularly concerning Redis. Monitor eviction history and adjust the allocation as needed to ensure efficient memory utilization.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Adjusting-Database-Buffers\" style=\"font-size:24px\">Adjusting Database Buffers<\/h3>\n\n\n\n<p>As your database grows, the buffers may need adjustment to optimize memory allocation. Run a MySQL tuning script to evaluate database usage and receive optimization suggestions for improving your my.cnf configuration file. By fine-tuning your database, you can enhance overall server performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"FPM-OPcache-Memory-Consumption\" style=\"font-size:24px\">Managing FPM\/OPcache Memory Consumption<\/h3>\n\n\n\n<p>FPM and OPcache play vital roles in PHP performance. Monitor their memory consumption and usage patterns. Utilize dashboards or command-line tools like those provided by OPcache Dashboard and PHP Performance Control Panels to gain insights. Based on your findings, adjust pool settings to ensure optimal performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Caching-Statistics-Review\" style=\"font-size:24px\">Caching Statistics Review<\/h3>\n\n\n\n<p>Caching plays a crucial role in improving website performance. Examine cache hit rates versus misses to determine if any adjustments are necessary. Analyze CDN cache and edge hit rates against the origin server. Evaluate cache control headers and NGINX proxy caching configurations to optimize caching effectiveness.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Application-and-Server-Caching-Statistics\" style=\"font-size:24px\">Application and Server Caching Statistics<\/h3>\n\n\n\n<p>Utilize powerful caching plugins like W3 Total Cache to leverage page caching, minification, fragment cache, and exclusions. Regularly review caching statistics provided by these plugins to gain an overview of their performance impact. Consider adjustments based on the insights gained.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Periodic-Performance-Testing\" style=\"font-size:24px\">Periodic Performance Testing<\/h3>\n\n\n\n<p>Periodic performance testing is essential to evaluate the overall performance of your website. Use tools like PageSpeed Insights, Lighthouse, GTMetrix, and Pingdom to gain comprehensive insights into your website\u2019s performance. By conducting regular tests, you can identify areas for improvement and optimize your site accordingly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Google-Analytics\" style=\"font-size:24px\">Google Analytics for User and Page Experience<\/h3>\n\n\n\n<p>Leverage Google Analytics to gain valuable data on user and page experience. Monitor the geolocation of your users and assess if your content is adequately distributed to provide optimal performance. Analyze metrics related to Page Experience and Core Web Vitals to pinpoint any areas requiring attention.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Uptime-Monitoring\" style=\"font-size:24px\">Uptime Monitoring<\/h3>\n\n\n\n<p>Maintaining high uptime is critical for ensuring a seamless user experience. Implement uptime monitoring using tools like Uptime Robot, Pingdom, or other suitable options. Look for services that offer notifications to alert you promptly in case of downtime. Regularly review uptime statistics to identify potential issues and take appropriate actions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Adjusting-Based-on-Monitoring-Results\" style=\"font-size:24px\">Adjusting Based on Monitoring Results<\/h3>\n\n\n\n<p>To achieve optimal performance, review resource usage against available resources. Assess your server specifications in comparison to your specific needs. Based on your monitoring results, determine whether scaling horizontally or vertically is the best approach for improving performance. We\u2019ll outline some situations where more RAM or CPU may be required.<\/p>\n\n\n\n<p>Monitoring and adjusting performance on your server and WordPress website are continuous processes that demand vigilance. By establishing a comprehensive monitoring regimen, reviewing caching statistics, conducting periodic performance testing, leveraging analytics, and ensuring uptime, you can <a href=\"https:\/\/www.inmotionhosting.com\/blog\/website-maintenance-checklist\/\">maintain a high-performance website<\/a>.\u00a0<\/p>\n\n\n\n<p>Regular adjustments based on monitoring results will allow you to optimize resource utilization and deliver an exceptional user experience. Remember to consider the specific needs of your website and the demands of your audience. By continually fine-tuning your server, caching mechanisms, and database configurations, you can ensure that your website performs at its best, even as it evolves and grows.\u00a0<\/p>\n\n\n\n<p>Stay proactive, stay vigilant, and let performance optimization be an ongoing priority for your server and WordPress website. With these strategies in place, you can keep your digital presence running smoothly and provide visitors with a fast, responsive, and enjoyable online experience.<\/p>\n\n\n\n<p><strong>Monitoring &amp; Performance Resources:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/top-monitoring-plugins-for-wordpress\/\">Top Monitoring Plugins for WordPress<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/server-usage\/stress-testing-methodologies\/\">How to Create a Website Stress Testing Plan<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/server-usage\/how-to-stress-test-your-website\/\">How to Stress Test Your Website \/ Top 3 Load Testing Tools<\/a><\/li>\n<\/ul>\n\n\n<p>\u00a0<\/p>\n<p class=\"btn-secondary-alt\">Back to Top<\/p>\n<p>\u00a0<\/p>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading has-x-large-font-size\" id=\"Experience-High-Performance-WordPress\">Experience High-Performance WordPress<\/h2>\n\n\n\n<p>Sign Up for your <a href=\"https:\/\/www.inmotionhosting.com\/wordpress-hosting\/managed-wordpress\">Managed WordPress<\/a> account today and experience the best performance possible for your high-traffic WordPress site! See how InMotion\u2019s fully-isolated servers offer 40x faster WordPress hosting speeds with dedicated resources, server caching profiles, and optimization tools. Improve Core Web Vital scores with NVMe, Redis, and UltraStack. All on high-availability servers with 99.99% uptime.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\">\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"About-the-Authors\">About the Authors<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Harry Jackson, Product Manager<\/h3>\n\n\n\n<p>Harry Jackson is an accomplished Product Manager with 15 years in WordPress, boasting a diverse skill set that goes beyond product development. He excels in innovative product creation, business development, content delivery networks (CDNs), and enhancing InMotion Hosting\u2019s SaaS solutions by extending WordPress features.<\/p>\n\n\n\n<p>Throughout his career, Harry has consistently driven innovation, leading transformative product initiatives and navigating development to empower digital experiences. His deep industry insight, coupled with a passion for WordPress, positions him as a leader in shaping exceptional solutions that tackle challenges and enhance user engagement.<\/p>\n\n\n\n<p>Harry\u2019s strategic business approach, combined with technical server knowledge, allows him to create holistic solutions driving business growth while ensuring seamless products for InMotion\u2019s customers. His ability to tailor <a href=\"\/wordpress-hosting\/features\">WordPress features<\/a> for InMotion\u2019s SaaS solutions gives him a unique edge.<\/p>\n\n\n\n<p>As WordPress evolves, Harry\u2019s commitment to revolutionizing digital experiences through strategic insight, relentless creativity, and passion for product excellence remains unwavering. His illustrious history and desire for innovation drive his excitement to shape WordPress-driven solutions and positively impact our customers. Harry\u2019s expertise in business development, website performance, and feature extension is pivotal for InMotion Hosting\u2019s SaaS offerings. His holistic product management approach and multifaceted skills make him a valuable asset in the world of web hosting and open-source solutions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Carrie Smaha, Senior Manager Marketing Operations<\/h3>\n\n\n\n<p>Carrie Smaha is a seasoned professional with a laser focus on Go-To-Market programs and cutting-edge SaaS solutions within the realm of Cloud WordPress Hosting. With an impressive two-decade journey encompassing IT project management, digital marketing, and web development, Carrie\u2019s passion for all things digital is evident in everything she does.<\/p>\n\n\n\n<p>Drawing from her extensive programming background, Carrie excels in troubleshooting and addressing technical needs for customers. She not only tackles challenges head-on but also takes the lead in identifying strategic marketing opportunities and seamlessly integrating solutions that drive results.<\/p>\n\n\n\n<p>Carrie\u2019s commitment to providing top-notch client services and marketing solutions is underpinned by her deep understanding of customer insights and industry dynamics. Her meticulous and detail-oriented approach ensures that she delivers exceptional value to clients on a daily basis.<\/p>\n\n\n\n<p>One of Carrie\u2019s true joys is working on demand generation and product marketing initiatives. She thrives on crafting multi-touch campaign designs, optimizing technical SEO, creating impactful content marketing strategies, contributing to software design, and streamlining business operations.<\/p>\n\n\n\n<p>In essence, Carrie Smaha\u2019s expertise, coupled with her genuine enthusiasm for digital innovation, makes her an invaluable asset in Go-To-Market strategies and SaaS solutions for <a href=\"\/wordpress-vps\">Cloud WordPress Hosting<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues with WordPress and the server it&#8217;s hosted on. Our guide combines over 20 years of experience of fine-tuning servers, CDNs, and website code to deliver high performance WordPress sites. If you&#8217;re<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\"> Read More ><\/a><\/p>\n","protected":false},"author":56983,"featured_media":108892,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[56],"tags":[4393],"class_list":["post-108222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-featured"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>2026 Ultimate Guide to Optimizing WordPress Performance<\/title>\n<meta name=\"description\" content=\"In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"2026 Ultimate Guide to Optimizing WordPress Performance\" \/>\n<meta property=\"og:description\" content=\"In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-07T00:33:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-22T16:25:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Carrie Smaha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@carriesmaha\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carrie Smaha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"74 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\"},\"author\":{\"name\":\"Carrie Smaha\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\"},\"headline\":\"The Ultimate Guide to Optimizing WordPress Performance\",\"datePublished\":\"2023-12-07T00:33:05+00:00\",\"dateModified\":\"2026-01-22T16:25:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\"},\"wordCount\":15874,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png\",\"keywords\":[\"Featured\"],\"articleSection\":[\"WordPress Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\",\"name\":\"2026 Ultimate Guide to Optimizing WordPress Performance\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png\",\"datePublished\":\"2023-12-07T00:33:05+00:00\",\"dateModified\":\"2026-01-22T16:25:33+00:00\",\"description\":\"In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Ultimate Guide to Optimizing WordPress Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\",\"name\":\"Carrie Smaha\",\"description\":\"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/carriesmaha\/\",\"https:\/\/x.com\/carriesmaha\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"2026 Ultimate Guide to Optimizing WordPress Performance","description":"In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/","og_locale":"en_US","og_type":"article","og_title":"2026 Ultimate Guide to Optimizing WordPress Performance","og_description":"In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2023-12-07T00:33:05+00:00","article_modified_time":"2026-01-22T16:25:33+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png","type":"image\/png"}],"author":"Carrie Smaha","twitter_card":"summary_large_image","twitter_creator":"@carriesmaha","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Carrie Smaha","Est. reading time":"74 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/"},"author":{"name":"Carrie Smaha","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8"},"headline":"The Ultimate Guide to Optimizing WordPress Performance","datePublished":"2023-12-07T00:33:05+00:00","dateModified":"2026-01-22T16:25:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/"},"wordCount":15874,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png","keywords":["Featured"],"articleSection":["WordPress Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/","name":"2026 Ultimate Guide to Optimizing WordPress Performance","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png","datePublished":"2023-12-07T00:33:05+00:00","dateModified":"2026-01-22T16:25:33+00:00","description":"In our Ultimate Guide to High Performance WordPress for High Traffic Sites, we will show you how to identify and fix common performance issues.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/optimize-wordpress-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"The Ultimate Guide to Optimizing WordPress Performance"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8","name":"Carrie Smaha","description":"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.","sameAs":["https:\/\/www.linkedin.com\/in\/carriesmaha\/","https:\/\/x.com\/carriesmaha"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/"}]}},"jetpack_featured_media_url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2024\/02\/Ultimate-Guide-to-Optimizing-WordPress-Performance.png","jetpack_sharing_enabled":true,"primary_category":{"id":56,"name":"WordPress Tutorials","slug":"wordpress","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/108222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/56983"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=108222"}],"version-history":[{"count":58,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/108222\/revisions"}],"predecessor-version":[{"id":131529,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/108222\/revisions\/131529"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media\/108892"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=108222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=108222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=108222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}