Firewall exterminator blocks bad bots and hackers from wordpress web sitesRegister with us when you use our free products

Speed up WordPress, my experience at web hosting

My web hosting experience and WordPress speed up
Speed up WordPress? WordPress slow?

Speed up WordPress - my experience with slow WordPress

If you are like me, you would never have thought you had a slow WordPress and you needed to speed up WordPress until you ran into some difficulties. Actually, I was quite tolerant of my slow WordPress as I was under the mistaken belief that as my host was in a far away country, in the USA, there was nothing I could do about it. Then one day in early February 2012, my website was hacked and I almost lost everything on both my websites. The hackers corrupted the hosting providers backups too, luckily for me I had made my own backup and had downloaded it into my PC, 3 days earlier. That was the week I decided to do something about shitty tech support service, hanging WordPress administrator panel - took almost 'hours' to login, and every weekend server down and websites cannot been seen on the high traffic days. How do you run an e-commerce site when your hosting provider is down half the time and slow the rest of the time?

I got frustrated with slow WordPress and knew I had to speed up WordPress

The year before, I suspected there was something wrong with my service provider and I had spent almost two months reviewing hosting services. Actually I found out that many of the published reviews were fake - they were advertorial sponsored promotions by the hosting companies. I found that many of the popular hosting services were saturated with too many website accounts that they had slowed down considerably. And obviously had many complaints regarding speed. I had to find a way to speed up my WordPress.

My slow WordPress was crawling

I started to take matters into my own hands. I used my watch to time how long it takes to load other websites and found mine was a miserable performance. That is because my host provider had too many website accounts on one server because mine was a shared hosting service. I thought that there had to be a way of testing if my host provider had squeezed too many accounts on one shared host. You see, there was a price war, in 2011 & 2102 , going on in cyber space and to keep bringing prices down, hosting providers were squeezing more and more websites into a shared served or a shared hosting plan. The result your websites slows down to a crawl. You get what you pay for.

A possible simple test to check if the host is overloaded

I couldn't prove that the host was overloaded and my old tech support were in denial about everything. Deny, deny, deny - that was the motto of my old reseller host provider. Worst still no tech support on Saturdays, Sundays and Public Holidays. They What?

Then it hit me. That was the Eureka moment. I found a simple test to determine if my host was overloaded and whether I could speed up WordPress. Go into your web hosting control panel and do a back up of your entire site. Wait for it to come back with the message that the backup has completed. Try this now on your own site. How long did it take? My old host took, on good days, 30 minutes to 45 minutes and on other days even longer. My new host provider takes 30 seconds. That is a vast difference, right? This is the possible clue that indicates your host provider is overloaded. If your backup is too slow than there is nothing you can do to speed up WordPress, immediately move to a recommended new host to speed up WordPress, like this one.

My recommendations for WordPress

WordPress is a beautiful blogging software package and I would recommend it to anyone who wants to begin blogging but choose your host carefully as it is not easy to transfer and there are bugs (version 3.3.1) in the Tools Import options of the administrators panel. The Import feature doesn't work properly and you may have missing thumbnails, ..etc and there are problems with phpmyadmin - it would not import correctly, databases which are compressed (at time of writing this article 16th March 2012)

Let us see how I optimised my system to speed up WordPress

1. Improving the loading of my widgets

Now I had to do something about the widgets to speed up WordPress. I found the only widget cache available, at the time of testing, WP Widget Cache By Andrew Zhang. You can find it in your WordPress Add Plugin in menu. My widgets we zapping thorough cyber space after I installed WP Widget Cache. Step by step I could speed up WordPress.

2. Reducing widgets

You will notice that I have many widgets. At one point I had more than 19 widgets. I suspected that reducing the widgets would speed up WordPress. I combined many of my widgets into one widget and you wouldn't notice that from looking at my page. That was one way to speed up my blog. I could see the improvement.

3. Caching the rest of the system, pages, database,... W3 Total Cache

Having cached photos and widgets which helped a lot to speed up Wordpress, I had to cache the rest of WordPress pages, database, ... I had tried a few different caches and eventually settled on W3 Total Cache. It was not perfect but I got round the difficulties (see .htaccess below). If you have no technical knowledge take the default settings and turn off Minify option as this can create a lot of problems and disable CDN option and Cloudfare option.

Do note that to speed up WordPress there is a special way to install W3 Total Cache. Please see the article by Howard Clemence and watch the video. It is a simple procedure but it really helped speed up WordPress.

Using W3 Total Cache really helped me speed up WordPress but I was still not happy.

As of 2013 I have stopped using any third party caching on my blog and am using my own cache plugin as mentioned in item 13 below.

4. Don't use a stop watch to time your results

Yes, I have to admit I was using my own watch to time the results. How primitive was I? As my WordPress began to speed up I had to use something more reliable so I went on a hunt for good tools to time my website. I found two good tools:-

a. GTMetrix - This shows two analysis, one is from Page Speed and the other from Yslow, and they indicate areas for improvement to speed up WordPress.
b. Pingdom - This shows you your site speed from different parts of the world.

Do use both sites to test you site speed. I was running about 4 to 20 seconds depending of the time of day, due to network traffic congestion in Malaysia, and which part of the world was viewing my site.

5. Use proper photo and picture compression

I had all my photos in .jpg format but for some reason or other I had my thumbnails in .png format. My thumbnails are quite large too, 300 x 300 pixels and not the standard 150 x 150 pixels. I didn't want to lose the clarity of a 300 x 300 pixel thumbnail so I re-saved them in .jpg format. By doing this my thumbnails sizes dropped from about 170kB - 250kB size to 20kB - 60kB size. That was a dramatic size reduction and you could see the difference in response times of my site.

Do test out different formats as .png is better for bold uniform images and no loss in image quality where as .jpg is good at photo compression but there is some loss in image quality. If you have a lot of photos this will help a lot to speed up WordPress.

6. Shrink photos and images to the display size

Many beginners make the mistake of uploading a large picture to their blog but display a small picture for readers to view. If your picture is 4000x3000 pixels, a typical digital camera photo size, but you only need to display a small picture, typically 448x336 pixels, then use a paint program to shrink the size of the photo and save it as a new photo. (You do not want to overwrite the original photo). A 4000x3000 pixel image is about 12MB uncompressed. A 448x336 pixel image is about 150,528 bytes uncompressed. That shows that a large picture will take atleast 80 times longer to transmit through the internet and your website will seem slow.

7. Choose a good theme

Your WordPress theme can slow you down a lot. Theme twenty ten and twenty eleven are very fast but very plain and you can't have much advertising space on them hence I developed a cache plugin to add adverts and messages to the bottom of you WordPress posts. For more information please refer to the dpaBottomofPostPage. I am using Atahualpa by WordPress and it looks very well optimised. Furthermore Atahualpa allows you to have up to 4 sidebars, two on the right and two on the left. I am using two sidebars, one on the right and one on the left, both are of different dimensions. So there is plenty of advertising space on my website.

As of today, April 2016, with the need to view webpages on smartphones, Atahualpa theme may not be the best option. I got around this by removing the left sidebar and by writing my articles in one column straight down the page and using a larger font.

8. Reduce the number of post displayed

I noticed that if your home page shows more than one post, visitors can find related interesting articles quickly. Initially, I had as many as 15 posts excerpts displayed. I reduced them to 10 post excerpts. The shorter your pages are the quicker they will be transmitted across the internet.

9. Reduce the number of comments to speed up WordPress

If you had visited the previous version of my website you would have noticed that some pages and posts had hundreds of comments. This takes up a lot of time to transmit across the internet. They are still there but I have limited the display of comments to 20 per page. That dramatically reduced the post size being transmitted. In the administrators control panel under Settings Discussions you will find the option 'Break comments into pages with...' tick it and reduce the default 50 to a lower figure.

10. Remove the Gravatars

You could disable all gravatars so that you website does not spend any time looking up the gravatar host to download the gravatars but then your comments may look boring. Not showing gravatrs for those who do not have gravatars may be a better choice. In your Setting / Discussion panel set to show blank.

11. Modify your .htaccess file to speed up WordPress

This one worked wonders to speed up WordPress page download. Do be carefull some modifications will not work and others will blow your mind away. Try them out one at a time and view your website like a visitor to see if there are any problems.

a. Don't add 'ExpiresActive On' the following code into you .htaccess file

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000

If you are using a cache this may be not necessary. In my case, with many caches, this piece of code gave lots of problems.

b. Have compression turned on

Add this code into your .htaccess file to turn on compression
<ifModule mod_deflate.c>
<filesMatch ".(js|css)$">
SetOutputFilter DEFLATE

This really helped speed up WordPress, see Apache help documents on compression and how to speed up for an explanation. Add it to the bottom of your .htaccess file. But I must warn you if you want to use this for non-WordPress websites test it out. I found that for simple html websites the additional time taken to compress and decompress the files actually slowed the web page delivery - may be the internet slowed when I was testing it with simple html files, I don't know.

c. Remove Etags

Add this code into your .htaccess file to remove etags:-
Header unset ETag
FileETag None

Place both lines of code as specified in the Apache docs on how to speed up in your .htaccess file. At the bottom of your file is ok. It removes etags and really speeds up transmission of your files through the internet. This really helped speed up WordPress.

12. Get a dedicated IP address.

I used to get about 350 to 480 visitors to my bread blog a day, back in 2012. When I got a dedicated IP address it did seem to speed up WordPress. But this speed up may be dependentant on the load on your shared hosting service.

13. Install the Bad Bot Exterminator and the SuperFast Cache.

After years of being attacked by hackers and bad bots I developed the Bad Bot Exterminator firewall and the SuperFast Cache plugin for WordPress blogs. When you install and run both of these products there is huge performance improvement to you webpage speeds and you get very good protection form hackers and bad bots.

I must thank the other bloggers who had inspired my work on how to speed up WordPress.

They are as follows:-
1. Tobias Nyholm on PHP Image Cache using image cache to speed up WordPress.
2. Ivan Kristianto on DB Cache Reload a database cache to speed up WordPress.
3. Shane Melaugh on how to speed up WordPress and site optimisation.
4. John Pozadzides on 3 ways to speed up WordPress.
5. Gregory Ciotti on 15 ways to speed up WordPress.
6. Mike on 5 steps to increase Google Page Rank. You speed up WordPress to improve your ranking.
7. Kyle Robinson Young on WordPress Caching to speed up WordPress.
8. Howard Clemence on How To Speed Up WordPress to Lightning Speeds With W3 Total Cache Plugin.
9. Admin on How to optimize WordPress .htaccess file to speed up WordPress.
10. Editorial Staff at WPBeginner mainly Syed and David on 18 Useful Tricks To Speed Up WordPress & Boost Performance
11. Emil Uzelac on how to speed up WordPress sites without caching.

The final result

Now I will show how I was graded by GTMetrix:-

how to speed up WordPress from a slow WordPress

When you do it step by step it is easy to speed up WordPress, even a slow WordPress.

This article My web hosting experience and WordPress speed up was researched and written by Peter Achutha, 16th March 2012


Copyright (c) 2013 - 2024 Peter Publishing - All Rights Reserved