Speed
Since the meltdown of W3 Total Cache a few weeks ago which ultimately killed so many of our sites … and by killed, I mean completely disabled. Not only could we no longer log in, but the sites were completely dead.
It was at this point I realized that relying on plugins alone was not only dangerous, but it was also inherently lazy too. Because one lazy programmer can completely destroy your ability to make revenues from you site and cause you hours of cleanup and wasted time.
Thanks to my lead designer for discovering much of this solution. Did we figure this out without using plugins? Sure, but that isn’t practical. The plugins that are being recommended have been tested, but as is the case on the web, every site and server configuration are different, so “your mileage may vary.”
The first recommendation is going to be getting a monthly subscription over at WPMUDEV.ORG. You may have been a member years ago like we were, but cancelled because it was a couple hundred a month and the plugins mostly sucked as they were bloated, crashed and rarely updated.
That has changed.
They now have a $49/month for EVERYTHING and you can even take it on a two-week test drive.
GTMetrix Benchmarks
BEFORE
Page Speed: 50%
Load Time: 4.6 sec.
Page Size: 2.4MB
Requests: 93
AFTER
Page Speed: 94% (88% improvement)
Load Time: 3.6 sec. (22% reduction)
Page Size: 920kb (62% reduction)
Requests: 25 (73% reduction)
Those are some SERIOUS numbers. How did we do it? Here’s how:
By checking out the Waterfall tab in GTMetrix, we can see exactly how the site is being loaded and spot issues quicky. The biggest offender were the images. And I mean HUGE. Now, these had already been optimized by Photoshop, but there is a great plugin from WPMUDEV that made the process of optimizing these real fast and in bulk.
STEP ONE: Image Optimization
Plugin: WP-Smush Pro – go into Media folder and basically press “Go.” There is an option to reduce the size of the images by 2x, but use this with care as we have had a few sites the images turned from blue to purple.
STEP TWO: Enable GZIP Compression
Yes, there are plugins that will do this, but don’t be lazy and have one for thing loading to slow you down. Just stick the info right into your .htaccess file.
Here is the code:
# BEGIN GZIP
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
# END GZIP
STEP THREE: Optimize/Compress JS and CSS
Doing this manually was too rough and took way too much time. The plugin that handled this chore the best was ‘Autopmize.’ Selected the options for Optimizing HTML, JavaScript and CSS.
STEP FOUR: Caching
We DIDN’T do this one just so you could see MASSIVE improvements without turning on the one thing everyone rants and raves about. But this is something you want to seriously look into, just avoid W3 Total Cache like the plague.
While I am not going to recommend a certain plugin as a “must use” you can review this article which compares the top three (including W3 Total Cache):
https://premium.wpmudev.org/…/top-wordpress-caching-plugins/
Also, WPMUDEV has a plugin called Hummingbird, of all things, and we have had mixed results with it. Some sites it works great, others it breaks stuff. It should state on the ones it works on, the speed is improved another 20-30% which is well worth the test.
~ Avoid CSS @import: Removed the codes/tags of importing external CSS file. specially were used for importing Google Fonts.
STEP FIVE: Remove Google Fonts
Seriously, just remove them.
STEP SIX: Remove Old JavaScript
Chances are you have gone through a few design changes and/or updates and you probably have (we did) old JavaScripts you weren’t using anymore. Remove these. Note: These can also include references to external JavaScripts as well.
STEP SEVEN: Review Your Design
Are you using bloated images when you could be using icons instead? Streamlining your design may not just make it load faster, it could improve conversion as well. Removed few images and used icons instead.
STEP EIGHT: YouTube Embedded Videos
Remove the YouTube video directly embedded on the page and instead use an image with a link of the video to open in a Lightbox popup. It is actually a smoother process and cuts down on the load time and number of requests.
STEP NINE: Set Expires Tag in .htaccess
Pretty simple, just add this in. If you’ve been a member for awhile, you probably remember my writeup on this when Yahoo! first launched YSlow. Chances are you just did a copy and paste on the code. If so, your expiration date probably “expired” just like mine did, which renders the code worthless. I set this two years in advance.
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">
Header set Expires "Mon, 31 Dec 2018 20:00:00 GMT"
Header unset ETag
FileETag None
</FilesMatch>
STEP TEN: Remove Web Forms
If you don’t have a high percentage of visitors filling out the web form on your home page (10% or more), then remove it and have a clickable graphic which will take them to the forms page. Doing this saved a ton in resources and page load time.
Should you shoot for 100%? No. For me, I just want to get in range and then go to the next project. You could spend hours, days or weeks fine tuning your settings to get 100% and it may not make a difference in your conversion rate. Me? 85% or above and it is time to move on.
https://gtmetrix.com/reports/jerrywest.com/59Atbx6X
Security
WPMUDEV has a great security plugin that will lock down your site, but we also had mixed results with it as well. For example, it completely kills MemberMouse. So test it first.
One of the ways hackers are getting into WordPress sites is to sniff what version of WordPress you are using. This article lays out how you successfully remove it, even from being found by the most experienced hackers.
http://www.wpbeginner.com/…/the-right-way-to-remove-wordpr…/
Hide My WP – a plugin that will mask WordPress usage to cut down on hack attempts.
iThemes Security – 30 different options to lock down your site.
P3 (Plugin Performance Profiler) – this plugin is from GoDaddy and is solid in determining which plugins are causing performance issues on your site. I highly recommend you leave this plugin inactive until you want to run it. It is not designed to be on full-time.