Search
Close this search box.

All WordPress speed optimization tweaks for 2-second loading speed

If your website is NOT optimized, it’s costing you a lot by harming your conversions and customer relationships (especially when you’re an e-commerce store).  

 

A slow website has many disadvantages:  

  • It punished you with a low Google ranking significantly  
  • It Increases bounce rates (visitors going back from your site within seconds)  
  • Increased bounce rates mean more penalties for ranking from Google and other search engines.  

 

People have very short attention spans, and even a little delay in loading a website means they’ll be clicking the back button and going back to your competitor’s site.

  

The recommended speed for a site to load is 2 seconds. This factor cuts your conversion rates so badly. A 1-second delay gives you a loss of about 7% loss in conversion.  

 

Thankfully WordPress website speed optimization can be done with easy tweaks.

 

While some of the tweaks are so simple that even non-techie guys can do them, other tricks are advanced and demand some knowledge of a little coding and how a WordPress website works.

 

We’re explaining all the tweaks and tips to whether you are an advanced or a beginner, so you can understand and apply them to your website to make it fast loading to get more ranking, traffic, and revenue.  

Check your website speed first  

Before you start optimizing your WordPress website, you must check your current site speed; this will help you: 

  • Know which things are leading to the slow site and fix them first.  
  • See the difference between your current website speed and after you optimize.  

Visit https://pagespeed.web.dev, enter your URL in the search bar, and click Analyze.

The easiest tweaks to kick off your website speed optimization 

Let’s talk about the easiest tricks and tweaks to start optimizing your website first.  

You can tackle and apply these tweaks immediately and will see some difference in speed fast.  

Upload compressed images 

The heavier the image, the more it causes the burden on your website pages. Sure, the quality may be higher but most of them are as heavy as 1MB.

  

This means that when the user is visiting your website, the page will have to request the database to load the image. Since the image is larger, it’ll take time to load.  

 

The difference could be even with 2 to 3 or even more seconds of delay, especially if your visitor’s internet is slow, It might take even longer for the website to load.  

Remember, even one second matters for conversion.  

 

This will cause a lot of bounce rates on your website, not to forget that Google already hates slow websites.  

 

There’s just a simple solution for that: before uploading the images, you can use simple online tools to reduce their size by compressing them.  

 

Don’t worry; most tools don’t ruin the quality of it. 

 

Use the Fotor online tool to compress your images; they even allow bulk image compression. The lower the size of images, the more it’ll be easier for your page to load.  

Don’t upload, but embed videos  

If you’re directly uploading the videos to your server rather than embedding them through third-party services, this is a great disaster.

  

It’s not only ruining your WordPress performance but there are so many other disadvantages to it:  

 

Slower website 

Of course, just like images, videos will take a ton of time to load for your server and if you try to compress them, you’ll ruin the quality which doesn’t convert into a good user experience.  

 

Taking up the storage of the server 

If you have low storage on your server, the video will eat up more storage and it’ll increase the hosting costs.  

 

Bandwidth usage  

Bandwidth is the limitation of data transfer between the traffic and the hosting server.  

 

If your hosting service is giving you limited bandwidth in your plan, then videos are surely going to eat up a lot of bandwidth which will cost you a ton. 

 

Either way, there’ll be a load on your server, and that results in a slow loading speed. 

 

Video compatibility issues  

Your visitors might be using some outdated browser or any other browser that might not support that video format which again will worsen user experience.  

 

Bulky backups & restores  

The worst part is the backup issues, the more audio and videos your website has, the more it’ll take to back up your website and restore it in any emergency.  

 

Embedding your video and audio will avoid these issues and it will not slow down your website.  

 

Since YouTube videos have no limits on uploading, you can embed longer videos without any bandwidth, storage, or performance issues.  

Database cleanup  

Just like phone storage, which gathers junk and other temporary useful files, it’s the same with your WordPress database, which collects some unused data and files from the plugins you used and from the theme over time.  

 

In the end, it’ll be slowing down your website significantly. Extensions like WP Rocket and others have the features to clean up your database with a user-friendly interface, and even beginners can do it. 

Clean Post Revisions 

Post revisions are extra revision copies of your blog posts on WordPress database. Whenever you save or publish a post, it is permanently saved in the database.  

 

This is also part of cleanup because these saved posts are the culprits in performance issues.  

 

Here are the other plugins which do the job of post-revision cleanup:  

  • Advanced Database Cleaner 
  • Optimize Database after Deleting Revisions 
  • WP-optimize 
  • WP-Sweep 

 

Remember, these plugins are primarily only for database cleanup. Extensions like WP Rocket have more functions for speed optimization. It’s better to use fewer plugins because more plugins mean speed issues.  

Turn off the trackbacks and pingbacks 

Pingbacks and trackbacks are the notifications sent to website owners when you link to them and the notifications that come to you when they link to you. This is a WordPress-exclusive feature and is good for backlinking.  

 

But it puts a ton of load on the server and the database as these notifications are HTTP requests.  

 

HTTP requests are already blamed for causing speed problems. And they also create issues of spam requests and DDoS attacks.  

 

To turn them off, simply visit the default post settings page from the Discussion tab from the WordPress admin dashboard.

  

And then uncheck these two options:  

  • Attempt to notify any blogs linked to the post 
  • Allow link notifications from other blogs (pingbacks and trackbacks) on new posts 

Cache your pages with a plugin 

This is the most crucial WordPress performance plugin for your website.  

If you don’t have it installed, WordPress takes a long time to load your site in your visitors’ browser, which reduces performance.  

 

  • Whenever a user visits your site, PHP (server) takes the WordPress page info from the database.  
  • Then it turns it into an HTML page 
  • After that, the page loads in your visitors’ browser 

 

See, how long is the process?  

 

But a caching plugin like “WP Super Cache” already keeps a rendered HTML page on a server and just loads it whenever a user visits.  

 

It brings the seconds of difference in your website’s speed! 

Don’t use shared hosting! 

Using shared hosting means you won’t have control over your WordPress speed optimization due to the dangerous disadvantages that come with it.  

 

Hosting providers host two or more websites on one server in a shared hosting plan. It appeals to many site owners due to their low-cost plans.  

 

But this means your website will share the performance and any effect that their websites will go through.  

 

If there are tons of visitors visiting their website at peak times, this will significantly consume the CPU and RAM of that shared hosting server. 

 

And since your website will be hosted on that server, it will slow down and even face an expected downtime if your website also gets tons of visitors at the same time as your neighbor. 

 

So, no matter how much you try to optimize your WordPress performance, these unexpected performance disasters will slow your website any time.  

 

But this doesn’t end here, if your neighbors’ website gets hacked or attacked by malware or any other security concern. Then this will also affect your website and even get hacked. 

 

Even more, if your neighbor’s website is using too many plugins or server resources, there’ll always be performance issues on your website.  

 

Sure, separate hosting is costly, but it’s the most secure way to keep your website optimized for speed. And you’ll also have complete customization and admin rights.  

Splitting comments and blog posts  

If you’ve posted long blog posts with a ton of media, then your website will certainly take time to load them all.

  

And if your blog posts have a lot of comments, it still has to load those comments. 

 

You can split these comments and posts into multiple pages, which can make a big difference in speed. The fewer elements the page has to load, the faster it becomes.  

 

Easy steps to split your comments into pages 

Head over to the settings from your WordPress dashboard and then to the Discussions tab.

  

Scroll to the “other comment settings” and then tick the “Break comments into pages with 50 top-level comments per page…”.  

 

How to split blog post pages  

Just enter the <! –nextpage–> HTML code in the HTML editor wherever you want your page to break.  

Lazy load your comment 

Whenever your visitor visits your website, it downloads and loads every image and even video immediately. This affects the page speed a lot, especially when the user has slow internet.  

 

Instead, WordPress allows you to lazily load your images, videos, and even comments.  

 

If enabled, your content will only be requested from a server and downloaded when the user scrolls down to it and when it becomes visible on their screen.  

 

The website will not render all the pages immediately, and that’ll result in a boost in your website’s speed.

 

How to turn on the lazy loading  

If your WordPress version is 5.4 or higher, luckily, you won’t have to do anything; it’ll be enabled by default!  

 

So, you must keep your WordPress updated to save your website from performance issues and get more features like lazy loading. 

 

But if you have other concerns about updating your WordPress, you can install plugins like WP Rocket to enable it.  

 

If you don’t want to install the plugin either, you can leverage HTML because browsers nowadays already support lazy loading. 

 

This will require you to edit HTML and it’s a manual task.  

But here’s the benefit of this method: you can enable lazy load for only the media you want.  

 

When editing your post and adding the image through the <img> HTML tag.   

Just add loading= “lazy” after the <img.   

 

Here’s an example:   

<img src=”media.jpg” alt=”This is the image” loading= “lazy” > 

Hotlinking problem 

Just like you can embed YouTube videos on your website so as not to use your server resources.  

 

Others can do the same for your website content too. This means they’ll be using your website resources instead! The more visitors they have, the more your server load will increase.  

 

If you have a DNS from Cloudflare, you can easily switch on the hotlinking protection from the dashboard.  

 

Other options include plugins like WP-Hotlink Protection or All in One WP Security to turn it off. But remember, avoid plugins as much as you can!  

 

These were by far the simple ways for WordPress performance optimization that will greatly improve your website’s speed.  

 

You can start now and tweak them all immediately, as they don’t require much techy knowledge.  

Advanced Website speed optimization tweaks (requires tech knowledge) 

Here are some advanced tweaks you can do to optimize your WordPress website and improve speed. 

 

This can help you reach the ideal speed of 2 seconds, though it requires a little more technical knowledge and effort.  

 

If you aren’t comfortable going into detailed tweaks it can become confusing for you if you aren’t familiar with them.  

 

We offer WordPress speed optimization services, where we take care of everything that will make your website faster to guarantee 2-second loading time without you having to do anything.  

Using a CDN and external DNS firewall  

Both combined can have the biggest impact on your website’s speed with more benefits of security.  

 

A CDN stands for Content Delivery Network, and the CDN provider has servers all over the globe.  

 

CDN is crucial if you want to have visitors to your website from all around the world. 

 

The problem with hosting servers is location limitation. Your visitor might be coming from another side of the world to your website which is far from the location of your hosting.

 

This distance between the user and the hosting server can potentially cause speed issues for that visitor.  

 

That’s why CDN providers keep a copy of your website’s JavaScript and CSS files which help load the website into their servers.  

 

Then they send the file to that user’s browser from the nearest server which helps keep your website faster for visitors coming from any part of the world.  

The DNS firewall security  

You must’ve used a plugin for firewall security to save your website from any attacks.  

 

But the problem with them is they run on your server and can affect performance and use your hosting CPU resources.  

 

Plus, they only intercept harmful traffic like DDOS after they enter your website. Either way, this will use your server’s usage and affect performance significantly.

  

But if you’re using DNS level firewall like Cloudflare:  

 

  • They don’t run on your server and don’t affect the performance. 
  • They run externally to block harmful traffic before it even reaches your website.
  • DNS firewall providers like Cloudflare have advanced security. 
  • They’ll also use CDNs to load the website for the user which means less CPU usage on your server and more performance.  

 

Using both CDN and firewalls from services like Cloudflare or Fastly will not only protect your website but also stop fake and harmful traffic including DDoS and any other hacker attacks.  

 

Your website will get genuine traffic and there’ll be less load on your hosting server which means you’ll reach the goals of your WordPress speed optimization of getting 2 seconds fast time loads.  

 

And with the CDN, any traffic visiting internationally will not face issues of speed. 

While you’ll have to pay a little cost fee with an external firewall and DNS, it’s worth it and a piece of mind.  

Installing DNS firewall and CDN 

Let’s say you choose Cloudflare for it (there are other options, but Cloudflare is a popular and trusted choice).

  

  • Firstly, create a Cloudflare account.
  • Add your domain’s DNS and nameservers there.
  • After the scanning, you’ll get new records for the DNS by Cloudflare.  
  • Add these DNS records in the admin settings of your domain name provider like GoDaddy.  
  • Confirm your settings for the SSL security in Cloudflare.  
  • Add the Cloudflare plugin to your WordPress admin.  
  • And then set up your domain there.  

Use a high-speed theme  

You’ll find many themes in the market for WordPress, but most of them might be designed without optimization for speed. If you have this kind of heavy and bulky theme used.  

 

Then it’s the fault of that theme that your website is slow in speed.  

 

You can go for the premium themes and read the description. Premium and high-quality themes guarantee 2 seconds loading time for the website as they’re highly optimized already.  

 

You must opt for a new and highly optimized theme whether you’re building your site or already have a live website with unoptimized and clunky code.  

 

This is especially important for E-commerce website speed optimization, because customers never put up with slow websites.  

Optimize clunky and unoptimized code 

If you’re familiar with CSS and JavaScript, you can check the code to see if there’s overused code used in CSS or JavaScript.  

 

For example, the developer might have used separate elements for each of the styling in CSS like this:  

 

Example of clunky CSS code: 

h1 { 

font-size: 24px; 

font-weight: bold; 

margin-top: 20px; 

margin-bottom: 10px; 

color: black; 

  

p { 

font-size: 14px; 

font-weight: bold; 

line-height: 1.5; 

margin-top: 10px; 

margin-bottom: 10px; 

color: black;} 

 

As you can see for every element, the developer has used multiple instructions. The browser then has to load this extra code as well. If your entire theme has this kind of code, it decreases the speed so much.  

 

Example of optimized CSS code 

 h1, p {

color: #000; 

font-weight: bold;

}

h1 {

font-size: 24px;

margin: 20px 0 10px;

}

p {

font-size: 14px;

line-height: 1.5;

margin: 10px 0;

 

In the above example, you can notice how clean this code is, and will take less time for the user’s browser to load.  

 

This is just a basic code example, on an advanced level, this kind of code leads to extremely slower websites.  

 

If you are familiar with the coding and understand it, you can optimize your WordPress website’s theme code.  

 

WP Rocket plugin is also an easy method which does the job for you easily by removing unused and unnecessary code from CSS.  

 

But if your theme is overly coded like this, then you must change the entire theme for the better. 

Avoiding unnecessary calls to the database 

Your WordPress website calls to the database to get the data when the user requests such as blog posts and more. 

 

But if your theme developer has made too many calls to the database unnecessarily and inefficiently just like in the context of unoptimized code.  

 

Your website will generate unnecessary HTTP requests which will result in a speed decrease. This is also a part of code cleanup.  

 

Many plugins help you clean up your database so your site won’t have any chances of being slow.  

Keep your theme lightweight 

You should customize your theme to remove the heavy elements from it like animations and elements that require downloading and unnecessary HTTPS requests.

  

This is also crucial because no matter how much you optimize your website with other tweaks, your heavy theme can cause issues.  

 

If your theme is very heavy, you should consider getting a lightweight and fast theme.  

Updating your PHP version  

Most site problems are caused by the outdated version of PHP your server side is running on. Either your plugins can slow your site or because your theme won’t support your PHP.  

 

That’s why updating your WordPress website’s PHP version can solve many issues by making it faster and secure.  

 

With the latest PHP version, you can install the latest plugins too because most of them don’t support the older versions.  

 

How to update your website’s PHP version 

On your WordPress admin dashboard, visit the Tools section and then Site Health.

 

You’ll find your current PHP version here. 

 

Then you can update your PHP from your hosting provider’s control panel like Hostinger or Bluehost.  

 

But before you update your PHP, you must know there are some compatibility problems that can be caused.  

 

Even your website could malfunction if the latest PHP isn’t supported or if your outdated themes and plugins are.  

 

That’s why you should first create your website backup, and update the WordPress version and all the plugins.  

 

It’s even better to create a clone version of your website to test it before making changes to your live site.  

Wrap Up 

Some of the tweaks can be done manually and easily while others can be done through plugins. 

 

But for the advanced tweaks like updating PHP or minifying your theme codes, you should consider hiring an expert who’ll do it for you, so you won’t fall into any problems.