Table of Contents
Website PageSpeed is the most crucial factor, as users expect the webpage to load speedily. Normally, visitors do not have the patience to wait while a website loads, so they just bounce back and look for another.
Additionally, Google has announced that website page speed is one of the ranking factors, so website speed must be a priority. There are many ways to increase your website speed which we will be discussing below.
Ways to Increase your Website Speed
Leverage Browser Caching
If the user visits your website the first time, it will take time to load. However, when that user returns to your website, refreshes the page, or moves to another page, they may already have some of the necessary files on their computer. To reduce page loads, browser caching will store some of these files locally.
How to enable Leverage Browser Caching?
Here we will discuss how to enable leverage browser caching. By enabling browser caching, your visitors can save items from your web page without having to download them every time they visit your site.
Design elements such as CSS stylesheets and content such as images can benefit from this feature. This leads to faster loading times and lower bandwidth.
You can enable leverage browser caching by adding this code to your .htaccess file:
There you have it, copy this code to your .htaccess file and enjoy quick load time.
If you are using YohoCloud, then it is already enabled with our hosting plan.
CSS, JS, and HTML minification
How to minify your CSS, JS, and HTML files?
You can easily minify your CSS, JS, and HTML files using different tools available in the market. If you are using a WordPress website, you can use WordPress plugins like Autoptimize, WP Rocket, etc. This helps in your files minification.
However, if you are using a hosting provider like YohoCloud, we offer LiteSpeed Web Server, which helps reduce your website load time; you need to install the Litespeed plugin to take advantage. You can learn how to install the WordPress Litespeed cache plugin in our previous blog.
Reduce the Time to First Byte (TTFB)
TTFB, Time to First Byte, is another factor affecting website speed. The term TTFB refers to the time it takes for the browser to retrieve data from the server. TTFB is a simple process starting from browser request to the server, processing the request, and then server responding to the user. So, try to reduce your website TTFB.
How to reduce the Time to First Byte (TTFB)?
You can reduce the Time to First Byte (TTFB) of your website by:
- Using CDN,
- Adding memory to your server
- Using caching plugins like LiteSpeed
- Activating browser caching
Enable GZIP compression
GZIP compression is another way to increase your website speed. Enabling Gzip compress can help you compress your files like HTML and CSS, which reduces loading time and bandwidth.
So, learn how to enable GZIP compression here.
How to enable GZIP compression?
You have nothing to do much for enabling GZIP compression in your website. You just have to add simply the below code in the .htaccess file of your website.
Thus, copy and paste this code to your .htaccess file and enable GZIP compression. However, if you choose the web hosting plan of YohoCloud, you will receive GZIP compression enabled by default.
A PHP X-Ray report provides detailed insight into performance bottlenecks involving the CMS. With this new tool, you can pinpoint what is causing a site’s slow whether its plug-ins, database queries, functions, or external calls.
How to Investigate and Fix a Slow Loading Website Using PHP X-Ray?
It’s easy to use the PHP X-Ray app to find out what’s causing your website to slow down!
Step 1: Open your cPanel account. Open the X-Ray App after you log in to the Software section.
Step 2: Click the Start Tracing green button on the top right corner.
Step 3: Below window appears. Fill up the fields to Start tracing.
- Under URL, you need to choose a domain. You will see your sub-domains and addon domains here if you have multiple domains attached to your account.
- Enter directory or path to the root of the URL you want to scan. For example, when your news page loads directly from https://www.yourdomain.com, put a / here. However, if your blog is located at https://www.yourdomain.com/news, enter news/.
- You can choose advanced settings to specify a client IP address and also to set the trace to run for a number of days or weeks if desired.
- “Record For” specifies the number of requests the trace will last for. If there are 20 traces, then for the next 20 times someone visiting your website (adding it to their browser or console) a trace will be triggered.
- At last, click the RUN green button to execute the trace.
Step 4: From the Tracing Task list, click Run. It will appear as follows:
In a new tab, open the URL you are scanning for the trace.
Click Refresh under Tracing Tasks on the tab where X-Ray is running. The task status has changed to “19 times left”.
Below are the details:
Trace execution was successful.
Step 5: Click the Eye icon under the Actions column to view the results of the trace:
The Recorded Sessions page will load and you will see a list of requests.
To load the requests trace, simply click any point on the peach-colored line.
A full results page will load. This is what you will see below:
Here you will find top issues, top software or plugins, and database queries and fix them. So now you know everything about PHP X-Ray Tool and the information the X-Ray trace holds.
Hence, keep the above-mentioned tips in mind to improve your website’s load speed. However, if you choose the best hosting plan in Nepal, you don’t need to care about these things since they take care of website page speed by default.