How I Achieved A Good Website Speed in 3 Hours Of Hardwork

0
413

Everyone is thinking that why is my website so slow? why google developers pagespeed insights suggest me to improve the website speed by compressing, removing and optimizing a few scripts, files and images from my blog.
This level of concern shows that Google website speed is a very important factor for every blog to get crawled ifficiently , therefore it could not be ignored at any cost.

Don't get caught plagiarizing, Test it Free!

A few days ago, i audit my blog with a free seo tool and when i watched over my google developers pagespeed insights, it made me shocked! I could not expect that my page speed would be at the score of 25, but believe me it’s true.

google developers pagespeed insights was reporting about my page speed, suggestions and problems and i became totally shocked by reading because this all happened in almost no time.

before this audit, i tested my website a week ago and my page speed was good. so i started asking a question that how could it possible that a week of carelessness has brought my blog towards death?

Well, i thought it’s better to work than regret because only hardwork could gave a good health to my blog, so i prefer to recover my website speed without wasting a second.

As you know, a score of 25 page speed in google insites can destroy the worth of whole domain at any time. so i was thinking that how it would be possible, is it easy to achieve the highest page speed back?

But i Knew that website speed optimization is somewhat difficult and i have to work hard to bring my good page load speed back.

I immidiately looked for some resources on the internet to optimize page load time which took me some hours to make together all the necessary implementations.

Because i had to browse many blogs for this purpose, that’s why i decided to make a comprehensive article on website speed optimization so my readers can get benefit without having to waste their time.

Estimates:

  • Difficulty:
    Intermediate
  • Required time:
    30 Minutes
  • Working method:
    Plugins and files
  • Expected improvements:
    50 to 60 percent
  • Achieved:
    25 to 75 in page speed insights

Quick page speed analysis

what is a good google page speed score

Google recommend to keep the page speed score above than 85 if you want to get an ifficient crawling.

But if you are capable to do so, i would strongly recommend you to don’t stop your hardwork untill it’s below than 100.

oogle site speed ranking factor

  • Google considers a lot of things while providing a specific page load time to any website but some of them as follows.
    HTML, CSS and javascript codes
  • Image size, quality and expiration
  • Server response time
  • What about WordPress blogs

WordPress contains a lot of heavy files so you are recommended to use a well coded theme and light plugins so you can avoid a lot of load.

On the other hand, you can use some wordpress page speed optimization plugins to maintain a good page load time.

Why my website loading time was increased

As you know that i use WordPress as my content management system, so i have to install many plugins to fulfill all the requirements of Blogging Doctor.

Without having installed such plugins, i cannot maintain all the functionality of this blog, not only Blogging Doctor requires plugins but every blog on wordpress cannot rely on default installation.

I installed some plugins to maintain images, blog structure, securety, SEO and appearance of my blog, and i never bothered about those files that plugins add in the header of every page.

Those plugins were heavy and made my website speed slow in a short period of time.

Because i could not survive without having that plugins activated, so instead of deleting such plugins i decided to go for website speed optimization to maintain a good website load time.

Apart of those plugins, there were some images as well which need to be optimize for maintaining the website performance.

On the other hand, google developers pagespeed insights was suggesting me to optimize the html of even my homepage, so what would i achieve if i had deleted some plugins? i won’t be able to optimize html for the homepage.

Some of my theme’s JavaScript and css files were causing the problem so you can say that Blogging Doctor was badly attacked by google developers pagespeed insights.

Steps I taken to recover website speed

So here is how i implement some website speed optimization techniques to recover a good google page speed for this blog. Note: I use some plugins and after that, I edit my htaccess file as well.

So these steps can be divided into two parts!

For Beginners

This section is easy to implement for beginners because none of your files or directories are going to be infected with this method, so you can follow all the guidelines without any fear of loss.

Image compression

First of all, i decided to compress images because i knew that there are many plugins which allows users to optimize the size and dementions of blog images.

For doing the job of image compression, i decided to asign this duty to a wordpress plugin called Optimus.

Optimus is an easy to use plugin which has a few options for setting up image compression for future images.

On the other hand, it has a wonderful tool which allows you to compress all the existing images in a single click.

Depending on the website, compression can take a few minutes according to the quantity of existing images on your blog, since i had only a few images, so it took me a minut to complete the task.

After the successful completion of this task, i went to the settings of optimus and turn the compression on for all the future images.

Upon the successful compression result, i ran a page speed test for my blog and my page speed was increased, now page speed insights was reporting that i have the 52 page load speed for desktop computers.

This result brought happiness into my heart and smile on my face because a single website speed optimization technique had given me a huge improvement.

Moved JavaScript files in footer

I wanted to move all the script files in the footer of my site because JavaScript is a client side scripting language, so it’s not necessary to load it before PHP.

Moving all the JavaScript files to footer could improve the server response time, and on the same time my Server side programming files (PHP) could have an opertunity to load up quickly.

Since i use WordPress, Therefore it was impossible to move those files manually, So i will disclose how i moved my script files later in this article.

CSS and JavaScript compression

Now i went for the compression of external css and script files which was included in my blog header.

It was difficult for me to compress all the files manually because manual compression could destroy the codes and i was not in mood to mess with codes for countless nights.

However i tried to use CSS and javascript compressor

but it was not remain helpful for me because my scripts and css files were large and my browser could not bear them.

Then i decided to try a wordpress plugin called better wordpress minify which was a good option who allowed me to move my javascript files in footer.

On the other hand, Same plugin gave me an option to compress all the css and javascript files so i didn’t need to look for any further plugin.

Better wordpress minify wordpress plugin has a simple settings page and turning the general options on are enough but it has many extra functionality as well.

After the completion of compression for javascript and css files, i went through google developers pagespeed insights and ran page speed test for my website.

My website speed was increased and now it was reporting that my blog has 61 google website speed.

It was a good signal because a single website speed optimization technique made my website load time 61 from 52.

Then i analysed the results and looked for other possibilities to increase my page load time.

Page speed test was suggesting me to compress HTML and most importantly it was reporting that my homepage needs to be optimize for a good page load speed.

HTML compression

Now i read the codes of my homepage using browser source, i tried to understand that what are extra things in that so i found some HTML comments and blank lines.

In order to remove all the spaces, blank lines and HTML comments, i used Minify HTML wordpress plugin which was an easy to use solution.

Minify HTML allowed me to remove all the extra codes and blank area from all of my blog pages and made my HTML shortest by bringing the whole code closest.

Now i cleared the cache for my website and read the page source again, i could see that all the html comments were removed and all the blank lines were deleted.

After that, i ran page speed test for my blog and find my site speed score at 68.

For advance users

This section is somewhat difficult and it can harm your website. so it’s recommended that first of all you should take a backup of your .htaccess file so you always have an option to restore it’s previous version if something goes wrong.

Leverage browser caching

I decided to set an expiration for all of my images, css, javascript and other files so my http requests can be controled.

For this purpose, i edited my .htaccess file and added following code in that.

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access plus 1 year”
ExpiresByType image/jpeg “access plus 1 year”
ExpiresByType image/gif “access plus 1 year”
ExpiresByType image/png “access plus 1 year”
ExpiresByType text/css “access plus 1 month”
ExpiresByType application/pdf “access plus 1 month”
ExpiresByType text/x-javascript “access plus 1 month”
ExpiresByType application/x-shockwave-flash “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 year”
ExpiresDefault “access plus 2 days”
</IfModule>
## EXPIRES CACHING ##

By adding this code to my .htaccess file, i basically told it to force users to store above mensioned filetypes for the specified time.

After implementing the proper leverage browser caching, i ran the page speed test and now it was reporting that my blog have a page load time of 75 for desktop computers and 69 for mobile devices.

Conclusion

I find it somewhat difficult to recover my good page load speed but by following the above mensioned steps, i finally bring my page load time from 25 to 75.

I know that i have to achieve 88 website loading speed if i want to receive the good page speed message, but i delay the further process and leave it uncomplete till another free time.

I will update this article with further website speed optimization once i complete the whole procedure.

Because my website speed was extremely slow so i could achieve only 75 with the whole process, but if you have already 60 plus, you can achieve hundred for your own blog.

Have you any further techniques to improve website performance? add your methods in comments below.


Don't miss even a single update, Receive everything in your inbox by providing your email below.