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 Content Marketing Drives Traffic to Your Jewelry Website

Customers are first looking for information and solutions before they can...

Why a Mobile-Friendly Website is Important for Your Business

Mobile internet usage is increasing faster than desktop internet usage due...

5 Useful SEO Services Tips For Small Businesses

With the ever-growing competition in the digital world, any small business...

Why You should Have a Business Website

In today's digital age, an online presence is essential for any...

Read Now

Top 6 Best Web Development Technologies to Build Website

Web development technologies are a huge part of the business of building websites. There are a wide range of options that you can choose from. Some of these choices include Django, PHP, JavaScript and more. But which ones should you choose to build your website? 1. JavaScript JavaScript is...

10 Best Web Development Tools to Improve Skills

You are in charge of making reliable web apps as a web developer. In addition to coding, this requires performing difficult and time-consuming duties, including troubleshooting issues and managing servers. Fortunately, solutions available can help streamline the procedure without sacrificing quality. The automation and security capabilities that are...

How to Execute a Successful Link Building Strategy?

Link Building is one of the essential non-SEO methods. With a logo, your content marketing efforts will be worthwhile. Of course, for this to be true, it is vital to understand how to conduct a successful link-building plan. It is common to hear about the necessity of link...

Use These 5 Apps to Improve Your Writing

Regardless of what line of work you are in, you can benefit from better writing skills. If you are in marketing or sales, or if you are an educator, the pluses are immediately obvious, but even if you are just sending out an email every once in...

Here’s How to Optimize Your Website for Search

Is your website just not getting the kind of traffic you’d hoped for? Did it used to get a lot of traffic but now gets considerably less? You need a better SEO strategy to Optimize Your Website for Search. Optimizing your website for search helps it show up...

7 Types of Backlinks: Which Should You Focus on Building?

Backlinks are some of the most commonly used SEO practice that can help a website build more traffic. Establishing backlinks to other authoritative websites plays a very important role in search engine results, and can be a decisive factor in how high or low a website appears...

5 Proven Methods to Increase Google Reviews

Google reviews are not only a reflection of a company's performance. They incentivize user purchases, give social proof, increase the conversion rate, and enhance the brand's reputation. And: Reviews will be one of the most influential ranking elements in 2022. Therefore, some individuals purchase Google reviews to...

How to Run TikTok Ads for Brand Promotion

Whether you're planning to use TikTok ads for brand promotion or your business on TikTok, there are several ways to get started. But, as always, the key is finding the right strategy for your unique business. TopView ads Appear First in the User's Feed Probably the most impressive of...

5 Benefits of Sponsored Content That Every Blogger Should Know

Sponsored content is one of the most effective ways to get more eyeballs on your website. It is so strong that it’s overtaking banner ads in some sectors. Check out these five benefits to see if you are planning to use it on your site today! Why Consider...

How to Create a Successful TikTok Marketing Strategy

In today's social media-driven world, where users are constantly bombarded with marketing messages, developing a marketing strategy that works for your brand becomes all the more important. And what better way to do this than through TikTok videos? Following these simple steps, you can create a well-planned...

9 Steps to Write a Technical Article

The instruction manuals, assembly manuals, and research papers, if not done correctly, technical article writing can quickly become a snooze fest. How can one write a technical article that people want to read? 1. Determine Your Target Audience Knowing your target audience is critical, especially when writing a technical article....

How to Sell Items on Facebook Marketplace?

Facebook began as a specific social networking site for interacting with friends and family, but it didn't take long for it to focus on companies and advertising. Given the prevalence of social media eCommerce, studying to offer on the Facebook marketplace is a terrific method to expand...