{"id":12740,"date":"2021-04-05T19:31:39","date_gmt":"2021-04-05T19:31:39","guid":{"rendered":"https:\/\/hivepress.io\/?p=12740"},"modified":"2024-05-24T15:14:06","modified_gmt":"2024-05-24T15:14:06","slug":"speed-up-a-directory-or-marketplace-website","status":"publish","type":"post","link":"https:\/\/hivepress.io\/blog\/speed-up-a-directory-or-marketplace-website\/","title":{"rendered":"How to Speed up a HivePress-built Website"},"content":{"rendered":"\n<p>Nowadays, website loading speed and overall performance are crucial for a good user experience and search engine rankings. Recently Google announced that it will begin to <a href=\"https:\/\/developers.google.com\/search\/blog\/2020\/05\/evaluating-page-experience\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener nofollow\" class=\"rank-math-link\">measure Core Web Vitals<\/a>, such as visual stability scores and page load times, for websites to determine whether they will qualify for a ranking signal boost. Also, pages with a longer load time tend to have higher bounce rates and lower average time on page.<\/p>\n\n\n\n<p>In this tutorial, we\u2019ll explain how to skyrocket your website\u2019s performance by setting up caching, optimizing styles and scripts, as well as optimizing the media content. We\u2019ll use the LiteSpeed Cache plugin, an all-in-one website acceleration solution with tons of tools and features for making your website blazing fast.<\/p>\n\n\n\n<p>For testing purposes, we\u2019ll use a <a href=\"https:\/\/hivepress.io\/blog\/how-to-create-a-directory-website-with-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress directory website built with WordPress<\/a>, HivePress and a few extensions along with the <a href=\"https:\/\/hivepress.io\/themes\/listinghive\/?utm_medium=referral&amp;utm_source=blog\" target=\"_blank\" rel=\"noreferrer noopener\">ListingHive theme<\/a>. However, if your website is not built with the <a href=\"https:\/\/wordpress.org\/plugins\/hivepress\/\" target=\"_blank\" rel=\"noreferrer noopener\">HivePress plugin<\/a>, you can follow the same steps for any other WordPress-powered website.<\/p>\n\n\n\n<p>So, let&#8217;s start with the LiteSpeed Cache installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing LiteSpeed Cache<\/h2>\n\n\n\n<p>First of all, you need to install the <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\" target=\"_blank\" aria-label=\"LiteSpeed Cache plugin (opens in a new tab)\" rel=\"noreferrer noopener nofollow\" class=\"rank-math-link\">LiteSpeed Cache plugin<\/a>. You can easily do it directly from your WordPress dashboard by going to the <strong>Plugins &gt; Add New<\/strong> section. Find it via the search bar and proceed by installing it. When the installation is finished, simply click on the \u201cActivate\u201d button to enable the plugin.<\/p>\n\n\n\n<p>Once it\u2019s installed and activated, you can start optimizing your website. Let\u2019s go through the basic cache settings first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cache Optimization<\/h2>\n\n\n\n<p>In order to adjust the basic cache settings, navigate to the <strong>LiteSpeed Cache &gt; Cache <\/strong>page. There are many different sections within this page, but we\u2019ll go through the most important settings only.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cache Settings<\/h3>\n\n\n\n<p>Here, we highly recommend disabling cache for logged-in users and REST API requests. This is required for the HivePress plugin to function properly. After you enable or disable any options, please don\u2019t forget to save changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"653\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_1.jpg\" alt=\"Speed up a WordPress website by optimizing cache options.\" class=\"wp-image-12745\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_1.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_1-300x261.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Object Cache<\/h3>\n\n\n\n<p>Next, let\u2019s enable the <strong>Object Cache<\/strong>. Navigate to the <strong>Object<\/strong> section and check if the object cache is available on your site. The connection test should be displayed as \u201cpassed.\u201d If so, you can enable the object cache, and this will drastically improve the website performance by caching duplicate database queries.<\/p>\n\n\n\n<p>There should be no trouble passing the connection test if your website is based on the OpenLiteSpeed server or your <a href=\"https:\/\/hivepress.io\/blog\/overview-of-the-best-wordpress-hosting-providers\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/hivepress.io\/blog\/overview-of-the-best-wordpress-hosting-providers\/\" rel=\"noreferrer noopener\">hosting provider<\/a> supports object caching.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"483\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_2.jpg\" alt=\"Enabling object cache option to speed up a WordPress-built website.\" class=\"wp-image-12746\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_2.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_2-300x193.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Browser Cache<\/h3>\n\n\n\n<p>Finally, navigate to the Browser Cache section and make sure that it\u2019s enabled. This will cache all the static content like styles, scripts, and images in the user\u2019s browser.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"498\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_3.jpg\" alt=\"Enabling browser cache option.\" class=\"wp-image-12747\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_3.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_3-300x199.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Page Optimization<\/h2>\n\n\n\n<p>Your next step is to navigate to the <strong>LiteSpeed Cache &gt; Page Optimization <\/strong>section in order to optimize the styles, scripts, and fonts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CSS Optimization<\/h3>\n\n\n\n<p>Let\u2019s start with the <strong>CSS Settings<\/strong> section. Here we recommend turning on the <strong>CSS<\/strong> <strong>Minify<\/strong> and <strong>CSS Combine<\/strong> settings.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CSS Minify<\/strong> &#8211;&nbsp; If you enable this option, all extra white space characters, newline characters and other unnecessary or redundant data will be automatically removed from CSS files without affecting the website styles.<\/li>\n\n\n\n<li><strong>CSS Combine<\/strong> &#8211; By enabling this one, all individual CSS files will be merged into a single CSS file. This way, the browser sends a single file request instead of requesting each CSS file separately, reducing the number of HTTP requests.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"451\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_4.jpg\" alt=\"Speed up a directory or marketplace website by setting up CSS files.\" class=\"wp-image-12748\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_4.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_4-300x180.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Font Optimization<\/h3>\n\n\n\n<p>If your site uses Google Fonts, there are a few options for optimizing the font loading. In the same <strong>CSS Settings<\/strong> section, you can scroll down and set the <strong>Font Display Optimization<\/strong> option to <strong>Swap <\/strong>so the fallback font will be used to display the text until the custom font has fully downloaded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"354\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_5.jpg\" alt=\"Font display optimization.\" class=\"wp-image-12749\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_5.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_5-300x142.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>Once you set the <strong>Swap<\/strong> option, go to the <strong>Optimization<\/strong> section within the same page and turn on the <strong>Load Google Fonts Asynchronously<\/strong> option in order to load Google Fonts in the background while the page is being rendered.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JS Optimization<\/h3>\n\n\n\n<p>Now let\u2019s go to the <strong>JS Settings<\/strong> section to optimize the JavaScript files. Here we recommend following the same steps as for the CSS settings. Simply enable <strong>JS Minify<\/strong> and <strong>JS Combine<\/strong> options so the JS files will also be minified and merged into a single file.<\/p>\n\n\n\n<p>There\u2019s also the <strong>Load JS Deferred<\/strong> option that can really make a difference. Once you enable this setting, scripts will be loading in the background while the browser renders the page layout and styles.&nbsp; Scripts are often \u201cheavier\u201d than HTML, so the loading and execution of scripts that are not necessary for the initial page render may be deferred and loaded later. It allows visitors to use the website almost immediately.<\/p>\n\n\n\n<p>After you check this option, please make sure that the website front-end is not broken because some scripts may require loading before the page is rendered.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"700\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_6.jpg\" alt=\"Optimizing the JavaScript files.\" class=\"wp-image-12750\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_6.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_6-300x280.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Media Optimization<\/h2>\n\n\n\n<p>Finally, you need to optimize your media content. Since images often account for about half of a webpage\u2019s content size, converting all images to WebP format (which is on average 30% smaller than other formats) can significantly improve your page load speed.<\/p>\n\n\n\n<p>In the <strong>LiteSpeed Cache &gt; Image Optimization &gt; Settings<\/strong> section, you can convert your website images to the WebP format by enabling the <strong>Create WebP Versions<\/strong> and <strong>Image WebP Replacement <\/strong>settings.<\/p>\n\n\n\n<p>After you check these options, navigate to the <strong>Image Optimization Summary<\/strong> section to get the domain key and optimize images by clicking on the \u201cSend Optimization Request\u201d button until the image optimization score reaches 100%.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"228\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_7.jpg\" alt=\"Optimizing media content on the WordPress-built website.\" class=\"wp-image-12757\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_7.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_7-300x91.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>Also, if there are any <a href=\"https:\/\/prestoplayer.com\/embed-videos-in-wordpress\" target=\"_blank\" rel=\"noreferrer noopener\">embeds on your website<\/a> (e.g., YouTube videos, Instagram posts or Tweets), it\u2019s better to load the embedded content only when users scroll down to it, not during the initial page rendering. It will make the first page render much faster and reduce browser memory usage.<\/p>\n\n\n\n<p>Navigate to the <strong>LiteSpeed Cache &gt; Page Optimization &gt;<\/strong> <strong>Media Settings<\/strong> section and enable the <strong>Lazy Load Iframes <\/strong>option.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"240\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_8-1.jpg\" alt=\"Optimizing website page content by enabling the &quot;Lazy Load Iframes&quot; option.\" class=\"wp-image-12758\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_8-1.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_8-1-300x96.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>Below is the screenshot of the Google PageSpeed results on mobile and desktop devices after we optimized the website performance following the steps in this tutorial.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"269\" src=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_9-2.jpg\" alt=\"WordPress page speed insight.\" class=\"wp-image-12759\" srcset=\"https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_9-2.jpg 750w, https:\/\/hivepress.io\/wp-content\/uploads\/2021\/04\/cache_9-2-300x108.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>That\u2019s it! If you built your directory or marketplace website with HivePress <em>(or any other WordPress-based solution)<\/em>, you can follow the same steps to set up caching, optimize styles, scripts and fonts, as well as the media content like images or embeds. As a result, you will get a high score on Google PageSpeed <em>(thus <a href=\"https:\/\/hivepress.io\/blog\/improve-wordpress-seo-of-your-directory-site\/\" target=\"_blank\" rel=\"noreferrer noopener\">boosting your SEO rankings<\/a>)<\/em> and improve the overall user experience of your website.<\/p>\n\n\n\n<p>Additionally, feel free to check the following articles:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/hivepress.io\/blog\/best-wordpress-directory-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">Best WordPress directory plugins<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/hivepress.io\/blog\/best-free-wordpress-directory-themes\/\" target=\"_blank\" rel=\"noreferrer noopener\">Popular WordPress directory themes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/hivepress.io\/blog\/mistakes-when-making-wordpress-listing-website\/\" target=\"_blank\" rel=\"noreferrer noopener\">Mistakes when creating a WordPress listing website<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Skyrocket your WordPress website performance in a breeze.<\/p>\n","protected":false},"author":686,"featured_media":12780,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[10,11],"class_list":["post-12740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-hivepress","tag-listinghive"],"acf":[],"_links":{"self":[{"href":"https:\/\/hivepress.io\/api\/wp\/v2\/posts\/12740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hivepress.io\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hivepress.io\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/users\/686"}],"replies":[{"embeddable":true,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/comments?post=12740"}],"version-history":[{"count":22,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/posts\/12740\/revisions"}],"predecessor-version":[{"id":33358,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/posts\/12740\/revisions\/33358"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/media\/12780"}],"wp:attachment":[{"href":"https:\/\/hivepress.io\/api\/wp\/v2\/media?parent=12740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/categories?post=12740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hivepress.io\/api\/wp\/v2\/tags?post=12740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}