WordPress Site Speed Optimization Case Study – www.thoughtsupport.net
www.thoughtsupport.net is the next in our series of WordPress site speed optimization case studies. This WordPress site also suffered from the wrath of CPU Throttling as our previous WordPress site speed optimization case study site. This site is also running on Bluehost shared hosting account. As we have promptly mentioned in all our earlier case studies, we repeat once again – there is no single formula for site speed optimization that works with all the sites.
All the sites are unique in their own ways and so we need to develop an individual site speed optimization solution that works with a particular site. The site speed diagnosis is one of the most important steps that helps us get to the root of site speed problems and issues. Getting to the root of the problem is quite important because unless and until we know the exact problem, the site cannot be entirely fixed to return great site speed optimization results. Observing, analysing, testing, diagnosing and then resolving issues are some of the most important steps behind optimizing any website to gain speed improvement. A strong web host infrastructure acts as the backbone for any website.
Step 1: WordPress Site Speed Optimization Case Study Diagnosis
Understanding the current site speed status of a site is the first and most important step for any speed optimization wiz. Looking inside Bluehost cPanel, we got to know that the site was suffering from CPU Throttling. Testing our case study site at www.ismyblogworking.com, we got the page generation time as 739 ms while page fetch time as 2076 ms. Ideally, these figures should have been around 600 ms for a site running at moderate speed. We did some speed page tests to understand the entire situation and to get at the root of all the speed issues for our case study site.
The above report clearly mentions the matter of site speed concerns in red. We need to work on improving all these factors to get our case study site running fast and clean.
First byte time of our case study site is 2.8 seconds. It implies that a viewer has to wait for 2.8 seconds before getting anything on the screen. It must be improved so that the users do not move out of site because of large wait time.
The report is not giving us good signals. The site needs an exhaustive clean up to get rid of all the unused or buggy plugins as well as unused themes.
The site was also tested on http://www.webhostinghero.com and got a rating of D.
Step 2: Fixing Basic WordPress Site Errors for Speed Optimization
In order to resolve the error, we commented the code causing the error with //. The plugin code looked like the following at the plugin editor:
// wp_register_style(‘hybridconnectgooglefonts’, $protocol . ‘//fonts.googleapis.com/css?family=’ . $hc_text_file);
We even tried removing Hybrid Connect, but many site functions stopped working. It was put back in place, but the plugin can be better coded to improvements its performance. Functionality should never come at the cost of site speed.
- Favicon.ico was missing so we fixed it by uploading the new favicon image.
Un-optimized images were our next concern area and we added EWWW Image Optimizer plugin.
Image optimization gets quite easy with this plugin as all the images are automatically optimized as upload to the site, media files that are big is made super tiny to keep the site running fast, all the media files uploaded to the site must be optimized for better performance.
Step 3: cPanel Configuration to fix wpconfig.php and .htaccess
wpconfig.php file was configured with the following code to gain site speed optimization for our case study site.
.htaccess file was configured with the following code using cPanel on its Bluehost account.
AddOutputFilterByType DEFLATE text/plain text/html application/x-httpd-php-source
AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
AddOutputFilterByType DEFLATE font/truetype application/x-font-ttf font/opentype application/x-font-otf
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 month”
We tested our case study site once again on http://ismyblogworking.com.
The result displayed page generation time as 3925 ms and page fetch time 5416 ms. It is not a good scenario and we need to get it fixed. Even zlib compression does not seem to be working.
Step 4: WordPress Configuration Changes for Site Speed Optimization
WordPress plugins plays a major role behind adding functionality as well as site speed. A trade off is always required while working with various plugins. Lack of a plugin may hamper your site with functionality, while overpopulation of plugins may get the site too messy for efficient operation.
- WP Clone by WP Academy was added, but we had to remove it. Since, it creates lots of files and Bluehost shared hosting plan does not seem to get friendly with it.
- EWWW Image optimizer was also removed to reduce the site load.
- Quick Cache Pro was installed, activated and configured to get the caching for our case study site.
- WP-Optimize plugin was also installed and activated to clean up DB.
- WP-HTML compression plugin was also installed and activated.
- We also tried Autoptimize plugin, WP Smush.it plugin, Cache Images plugin and WordPress Gzip compression plugin, but removed as these plugins were not getting well with the current setup.
- Cloudfare was activated from Bluehost cPanel to increase the site load speed.
Rocketloader was activated and caching level set to aggressive.
Step 5: Advanced cPanel and .htaccess configuration
Using cPanel, we configured some PHP configuration options.
Http turned on for better site speed optimization and PHP 5.4 (FastCGI) + http also worked well with our case study site setup.
.htaccess file was further tweaked and configured with the following code:
php_value zlib.output_compression on
Header set Connection keep-alive
Header append Vary User-Agent env=!dont-vary
ExpiresDefault “access plus 14 days”
Header set Cache-Control “public”
Header set Cache-Control “max-age=7200, must-revalidate”
AddType text/css .css
SetEnvIfNoCase Request_URI \.(?:rar|zip)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:avi|mov|mp4)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
zlib.output_compression = On did not worked after our basic .htaccess configuration, but it was fixed after advanced configuration changes.
Step 6: Jetpack Configuration for Site Speed Optimization
- JetPack by WordPress.com is a great plugin full of power. It includes some basic functionality as well as enhanced options to power a large number of WordPress sites. JetPack was active on our case study site and getting inside it, we observed that our case study site was only using JetPack comments and mobile theme features.
- JetPack comments was active on our case study site installation, but it was not working. The installed WordPress theme used its inbuilt comment system. Since, JetPack comment feature was not working in conjunction with our case study site theme, we disabled it as there was no sense to keep it even when it was non-functional.
- We also activated Photon Free CDN, but it did not returned the results as expected. Enhanced Distribution was also turned ON.
- The current WordPress theme of our case study site is not responsive. The site is dependent on JetPack for its Mobile version.
- WordPress Theme acts as the foundation behind all the WordPress sites and a bad theme can prove devastating for the whole website. Themes at mysitemyway.com and codecanyon.net are good and goes well with WordPress without posing any threat either to WordPress functionality or to WordPress site speed.
A good theme will help you keep many unnecessary plugins out of the way, making the site light and speedy.
- We tried to fix most of the site issues without changing the active WordPress Theme. JetPack Mobile Version was removed as we decided to run the standard theme out of the box. The theme is not responsive, but still looks better without JetPack Mobile Version.
The site was tested to check any scope left out for site speed optimization, but everything turned out quite well.
|Factor||Before Optimization||After Optimization||Result||Gain|
|Page Speed Grade||75% (C)||90% (A)||Improved||20%|
|YSlow Grade||69% (D)||93% (A)||Improved||35%|
|Page load time||4.45 s||0.71 s||Improved||84%|
|Total page size||1.33 MB||763 kB||Improved||44%|
|Total number of requests||73||36||Improved||51%|
An overall improvement in Page Speed Grade, YSlow Grade, Page load time, Total page size and Total number of requests achieved.
|Factor||Before Optimization||After Optimization||Result||Gain|
|Page Size||1.4 MB||909.2 kB||Improved||37%|
|Load time||4.04 s||376 ms||Improved||91%|
Page load time from reduced from 4.04 s to 376 ms, 91% improvement in load time performance.
|Factor||Before Optimization||After Optimization||Result|
|First Byte Time||F||C||Improved|
|Cache static content||F||B||Improved|
|Effective use of CDN||X||YES||Improved|
First Byte Time, Compress Transfer, Compress Images and Cache static content improved.
The page generation time turned out to be 136 ms (Earlier 739 ms) [Improvement – 82%] and page fetch time 159 ms (Earlier 2076 ms) [Improvement – 92%].
Our case study site is finely tuned to run the best under the given limitations imposed by shared hosting account.
CPU Throttling is an issue with the site as it is hosted on Bluehost shared hosting account.
Wordpress Theme is also an issue with this case study site as it is not responsive.
QuickCache Pro goes well to cache the site pages.
Mark de Scande did the site speed magic once again and got the site load time below 1 second, even under tight parameters imposed by Bluehost shared hosting account, A better theme and a better host such as WP Engine, VPS or dedicated hosting account can help the site perform better on site speed optimization factors.
Do not hesitate to leave your comments below or ask any questions about this case study site. We would be happy to answer.