HomeSEOHow to speed up...

How to speed up your WordPress Website: Tips And Tricks

It is always important to optimize WordPress website speed for a smooth and inspiring user experience. And search engines also love faster pages.

WordPress website Speed optimization

As we all love faster websites and want a speed WordPress website. All the websites owner and especially beginners should know the tricks through which they can boost their websites. I will focus on some important tricks which I experienced and got a much faster website.

So I will recommend you to take some important steps before you go further. If you are a beginner, you must read the Prerequisites section to avoid making problems and or crash your WordPress website.

Prerequisites

  1. Create a backup of the .htaccess file. (you can reload it if the changes break your website)
  2. Purge all cache and disable the cashing Plugin.
  3. Check your website by refreshing it to ensure it’s still working.
  4. Suppose you found that your website is not loading or not working. Find a possible solution for that error.

How to increase WordPress website Speed using the .htaccess file

First of all, we will take a brief overview of a list of .htaccess file tricks to enhance and increase speed. This list covers the major and recommended changes by most of the developers to increase website speed.

  • Compression (Gzip and Deflect)
  • Disable Image Hotlinking
  • Activate mod_pagespeed option
  • Enable light speed server cache

Enable GZIP compression

Compressing files on your local computer can save a lot of disk space. Similarly, for the web, we can use GZIP compression. This maneuver will dramatically reduce the bandwidth usage and the time it takes to gain access to your website. GZIP compresses various files so that whenever a visitor tries to access your website, their browser will first have to unzip the website. This process brings down the bandwidth usage to a considerable extent.

Check out: How Secure WordPress Site from DDoS Attacks

You can use either a plugin like the PageSpeed Ninja, enabling GZIP compression, or adding the following codes in your .htaccess file.

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Disable Image Hotlinking

This trick is to restrict other sources from using your website images. There are huge chances that spammers can use your image link to their own website. Every time someone visits their page, the linked images will be loaded from your website/server. This is called image Hotlinking.

So you copy and paste the below code into your .httaccess file to prevent image Hotlinking.

# DISABLE IMAGE HOTLINKING START 

RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?sample.com [NC] 
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] 
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] # 

#DISABLE IMAGE HOTLINKING END

Active mod_pagespeed

This trick is to enhance and optimize your website, especially relevant, and works with Apache Server. Google develops the Mod_pagespeed module and now a few major hosting providers like DreamHost, SiteGround, and Godaddy to increase its page speed. However, this module could be installed using SSh on your Cpanel.

Copy and paste the below code to the .htaccess file to enable this module.

# ENABLE MOD PAGESPEED START # COMBINE CSS, COMPRESS IMAGES, REMOVE 
#HTML WHITE SPACE AND COMMENTS 

<IfModule pagespeed_module> 
ModPagespeed on 
ModPagespeedEnableFilters rewrite_css,combine_css 
ModPagespeedEnableFilters recompress_images 
ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp 
ModPagespeedEnableFilters collapse_whitespace,remove_comments 
</IfModule>

#End

LightSpeed Cache

Suppose you are using a lightspeed Server to run your website. You should use the below code to enable LightSpeed Cache Option.

# ENABLE LITESPEED CACHE START 

<IfModule LiteSpeed> 
CacheEnable public 
RewriteEngine On 
RewriteCond %{REQUEST_METHOD} ^GET|HEAD$ 
RewriteCond %{HTTP_HOST} ^sample.com|sample.net|sample.org [NC] 
RewriteCond %{REQUEST_URI} !login|admin|register|post|cron 
RewriteCond %{QUERY_STRING} !nocache 
RewriteRule .* - [E=Cache-Control:max-age=300] 
</IfModule> 

#ENABLE LITESPEED CACHE ENDerver level caching.

Important Note: – you should add/edit the mentioned module codes one by one in your website .htaccess file. Check your website every time you add/edit a module, so it will help you to know which module is not fit for your website.

Bonus tips and tricks

Reduce image sizes

Image is the major contributor to the size increment of a given webpage. The trick is to reduce the size of the images without compromising on the quality.

If you manually optimize the images using Chrome PageSpeed Insights extension or Photoshop or any other tools, the process will take a long time. Fortunately, there are plugins available for just about everything you can think of, including image optimization. The ones worth mentioning are:

Using any of the above-mentioned plugins on your WordPress site will drastically reduce image sizes, thus improving your website’s speed.

Use advanced caching mechanisms with a caching plugin.

WordPress caching plugins (e.g., W3 Total Cache) has been there for a long time, making the complex tasks of adding caching rules to your website elements easier. Combining such plug-ins with advanced caching mechanisms like Varnish could help you better your website’s loading speed and ultimately speed up WordPress considerably.

Use a CDN

The people who visit your website belong to various locations globally, and needless to say, the site-loading speed will differ if the visitors are located far away from where your site is hosted. Many CDN (Content Delivery Networks) help keep the site-loading speed to a minimum for visitors from various countries. A CDN keeps a copy of your website in various data centers located in different places. The primary function is to serve the webpage to a visitor from the nearest possible location. Cloudflare and MaxCDN are among the most popular CDN services.

Cleanup WordPress database

Deleting unwanted data from your database will keep its size to a minimum and reduce the size of your backups. It is also necessary to delete spam comments, fake users, old drafts of your content, and maybe even unwanted plugins and themes. All of this will reduce the size of your databases and web files and thus speed up WordPress – your WordPress.

Minimize external java scripts

The usage of external scripts on your web pages adds a big chunk of data to your total loading time. Thus, it is best to use a low number of scripts, including only the essentials such as tracking tools (like Google Analytics) or commenting systems (like Disqus).

Check out: Top 9 WordPress Tips That Are Worth Knowing

Most Popular

More from Author

How Conducting an SEO Audit Can Improve Your Online Presence?

A strong online presence can make or break a business in...

10 Things to Consider When Crafting SEO Strategies for Niche Businesses

As a business owner operating in the digital landscape, it's essential...

7 ways Social Media Marketing can Boost Your Car dealership

Social media has undeniably become a cornerstone of our modern society,...

Share The Love: 5 Tips For Writing Awesome Guest Blogs That Will Perform Well.

When it comes to blogging today, you aren’t limited to just...

Read Now

How To Get Your Name On Top Of Google Searches?

As you know, Google is a popular search engine, and taking your brand name to the peak of its searches holds significant importance. Knowing how to get your name on the top of Google searches is critical. This is what a business, brand, or organization strives for,...

What is Direct Mail & Why It Is Still an Effective Marketing Tool

Direct mail is a tried-and-true marketing strategy now. As technology advances, businesses may prioritize digital marketing channels such as email and social media, but direct mail continues to be effective. In our article, we will define direct mail, fantastic ideas for doing it right, and explore why...

Data-driven Decisions: The role of Analytics in Effective Marketing

In today's digital landscape, data is a powerful currency that fuels strategic decision-making and drives business success—of marketing, analyzing its pivotal role in empowering businesses to make informed choices based on data-driven insights. By harnessing the power of analytics, businesses can gain a deeper understanding of their...

The Growing Challenge Of Ranking For Commercial Keywords: Overcoming Obstacles 

In the ever-evolving landscape of search engine optimization (SEO), one of the biggest challenges website owners and marketers face is the increasing difficulty in ranking for commercial keywords. Commercial keywords are those that directly relate to products, services, or industries with the intent to make a purchase....

4 Reasons to Focus More on Online Marketing

In today’s fast paced, technology-driven world, everything is changing – including the way we do business. In 2023, online marketing is all but replacing traditional advertising channels, and if you start leaning more in this direction, it will only boost your business and help you keep up...

What Are The Best Ways To Increase My Brand Awareness Online?

One of the most apt idioms to highlight the importance of brand awareness in digital marketing is: “You can lead a horse to water but you can’t make them drink.” For example, it doesn’t matter how much traffic you have heading to your website, if you have very...

How to Optimize Your Site For Mobile Users

Mobile devices have become our constant companions in today's world, and their influence on web browsing continues to soar. With growing smartphone users, ensuring your site delivers an exceptional mobile experience is crucial. In this blog, we'll unveil the best practices to make your website mobile-friendly, capturing the...

6 Best WordPress SEO Plugins for Boosting Website Traffic

Do you know why only a few websites appear at the top of search engines? The answer is ‘good SEO. If you put the needed and the right efforts into this vital part, you can grab the topmost seat on search engine results. A website is built with...

Does Email Marketing Have Any Impact On Your Search Engine Optimization?

In the world of digital marketing when there are so many different strategies available to you, it’s always worth looking for ways in which two or more methods can be used to complement one another – for example, using video marketing to increase social media engagement. But...

From Dated to Dazzling: Transform Your Website with Professional Redesign Services

The development pace of websites is skyrocketing. And in 2023, site owners can't afford to have their pages look the same for months or years on end. But how can you revamp a site such that it's worthwhile to the business? This article will show you EXACTLY how...

Top 7 SEO Trends to Increase Organic Traffic

Search engine optimization is one of the best ways to boost organic traffic; however, keeping up with its ever-evolving trends can be challenging. SEO specialists work tirelessly to stay abreast of trends in order to deliver relevant content at exactly the time users search for it - and...

How to Create Winning Content Strategy for Tech Websites

Brands may promote their wares and gain potential customers through content creation. This is particularly valid for tech businesses that market cutting-edge products to support the development of innovations. With the right content strategy in place, you can capture your intended audience at any point in the...