1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

From Snail To Cheetah: 30 Ways To Speed Up Your Site

Discussion in 'Blogging' started by Zwielicht, May 16, 2015.

  1. Zwielicht

    Zwielicht Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    7,119
    Likes Received:
    12,572
    Gender:
    Male
    Occupation:
    Reaper
    Location:
    Riverside, California
    Home Page:
    [​IMG]

    I've seen quite a few posts here on Black Hat World where a member here was complaining about their site being too slow. Since these posts are becoming more prevalent and I've been meaning to create a new thread after my "The Ultimate Guide To Ranking A Website Without Building Backlinks" guide, I figured that this forum could use a website speed guide, so here it is!

    30 Ways To Speed Up Your Site
    1. Use A CDN Such As Cloudflare
    I'm not the biggest fan of Cloudflare these days, but a content delivery network (CDN) is a network that you use to deliver the content on your website to your audience from a server that's close to the visitor's geographical location. With this in mind, you can see how using a CDN can speed up your website significantly.

    For instructions on setting Cloudflare up on your website, visit Cloudflare's support page.

    2. Remove Any Unnecessary Plugins

    For those of you using Wordpress, go to your plugins page. How many of those plugins are you actually using? Do you really need "Awesome Surveys" on your website when you don't have any visitors? What about "BJ Lazy Load"; do you really need to use that plugin when you hardly have any images on your site?

    Having a bunch of plugins doing who knows what may cause your site to load slowly, so use a tool such as Pingdom's speed tester and look for any plugin files that are slowing down your website. In some cases, you might even have plugins conflict with other plugins, causing your site to load slowly or appear broken in some places.

    3. Change Web Hosts

    If you think you've tried everything to speed up your website and your site's still loading slowly, then perhaps it's because of a slow server response time. Changing your web host to one that offers a faster server response time is an easy, albeit possibly expensive change. There are also web hosts here who offer quality hosting packages (research them first), so visit the Hosting sub-forum to find them.

    4. Upgrade Your Hosting Package

    If changing web hosts is not an option for you, consider upgrading your hosting package with your current web host. Many web hosts offer a multitude of package, such as shared hosting and SSD hosting, the latter of which can boost your site speeds significantly. However, in my experience, if the web hosts lesser packages are causing your site to load in 5 seconds, their "better" packages are usually less than stellar.

    5. Lazy Load Your Images

    For those of you who have multiple images on your websites, consider using a lazy loader to load the images as the user scrolls down your page. For Wordpress users, there is a plugin called BJ Lazy Load that can do this for you.

    However, I should warn you that lazy loading pisses some users off, so know your audience before you do this.

    6. Leverage Browser Caching

    I personally haven't noticed much of an effect using this method on any of my sites, although you can try using a plugin called "WP Fastest Cache" to speed up your site (just don't go crazy with the plugins and look for caching plugins that have this option).

    7. Compress Your Images

    This is just reducing the file size usually, though not always without a visible loss of quality. Images that have already been uploaded can be compressed on your Wordpress website by using a plugin called "EWWW Image Optimizer".

    One thing I should warn you about is that I've found PNG files tend to take a long time to upload when you have this plugin installed.

    8. Remove Query Strings From Static Resources

    Query strings in static resources are resources with a "?" toward the end of the URL of a static webpage. Again, for you Wordpress users there caching plugins that can do this for you such as "Remove Query Strings From Static Resources".

    Similarly to leveraging browser caching, I haven't seen much of a difference using this, but you might.

    9. Minify Your Codes

    Minifying your codes reduces the number of unnecessary characters in your codes that can cause your site to load slower. There are caching plugins such as W3 Total Cache that have this option in Wordpress, although be warned that these minify options, when conflicted with plugins or CDNs such as CloudFlare, can "break" the design of your website (although this is easily reversible when you disable the minify option). In other words, don't minify using Cloudflare and then minify using a plugin.

    10. Remove Broken Links

    If a browser is trying to load your website, but it begins to encounter broken links for the files that it's loading, then this could slow down your website. There's a plugin you can install and later delete (so you don't have a million plugins by this point) for this called Broken Link Checker.

    11. Reduce The Number of Posts That Show On Your Homepage

    Loading 20 posts on your homepage slows down your site, especially if you have images that load with your posts. For Wordpress users, if you go to your settings, then to "Reading", you can change the number of posts that appear on your homepage. Additionally, showing excerpts instead the full posts on your homepage can speed up your site a bit.

    12. Use A Full Service Caching Plugin

    By full service, I mean a caching plugin that has multiple caching and speed options (minifying, browser caching, etcetera). Having one plugin that does this instead of 10 separate plugins can reduce the number of plugins on your site and increase your website's load time.

    But rather than use a plugin, you could use Cloudflare since it also has several caching features.

    13. Change Your Theme

    Some themes are slower than others due to being "bulkier" or poorly coded. If possible, try looking for a theme that's advertised as lightweight.

    14. Move Javascript To The Footer

    JavaScript typically takes longer to load, so serving your content first before your JavaScript can reduce your page loading times. Again, there is a plugin that does this for you, although take how many plugins you already have on your site into consideration before adding yet another one.

    15. Convert PNG Images To JPEGs

    PNG images are lossless, meaning they preserve every detail of the image. Those of you who are audiophiles already know how large lossless music files can be when compared to their lossy MP3 counterparts. When it comes to images, it's the exact same deal; PNG files are larger than JPEGs, meaning that when you use them on your website, they can slow down your site significantly.

    Unless your image uses a transparent background or you have a site that focuses on photography, it's better to use the JPEG format for your images. However, if you absolutely must use PNGs, then you do have the option of compressing them. Despite how contradictory it sounds, compressed PNGs are still lossless.

    16. Remove On-Page 404 Errors

    I'm unsure of how much of a difference, if any, fixing internal 404 error links will make. But it's something you should do anyway. Since this is similar to #10, to the plugin I linked to there will detect these broken links as well.

    17. Reduce Your Page Size

    If possible, look into ways to reduce your page size such as by removing unnecessary images or videos as larger pages take longer to load.

    18. Optimise Your Database Tables

    Post revisions and spam comments need to be purged from your database to reduce the size of your database and to reduce the loading speed of your website. For Wordpress users, there are a multitude of methods that you can use to optimise your database that are easy to use.

    19. Avoid Using Too Many Redirects

    Redirecting to a redirected link that has been redirected to another link can take quite some time to load, so avoid using too many redirects.

    20. Remove Redundant Code & Text

    I've been to sites where the article loads and then a text version of the articles loads below it. Why!? If you have redundant text & code on your pages or in your files, then remove it.

    21. Remove Whitespace

    Whitespace in your HTML code (double spaces, tabs, and text line breaks) just adds more space to your file size, so removing this code with an HTML compressor can reduce your HTML file sizes.

    22. Remove Unnecessary Images

    Consider this: do the images on your page add any real value to the rest of the content? Do you need 3 different images that demonstrate the exact same point? If an image doesn't add any value to your content or to your visitors, then consider removing it.

    23. Clean Up Your Code

    Some codes, especially the codes in free Wordpress themes, are messy and contain extra characters and superfluous lines that slow down your website. Dirty Markup has a tool to help you clean up your code, so I recommend using it if you decide to clean your code up (or do it manually).

    24. Correct Any Canonicalisation Errors

    If your site uses https://www.yoursite.com/, then be sure to use this URL across your entire site. This also has an SEO benefit since search engines will see the URL that you used is the correct one to index.

    25. Use Static Pages When You Can

    Static pages are pages that don't change often or at all and are delivered to your visitors the way they are stored (in contrast to dynamic pages which are generated by a web application).

    26. Avoid Using Gifs

    This isn't 2001. I've been to some sites filled to the brim with gifs because the site owner thought they were funny. Gifs are large files (since they're a combination of images), so don't use them on your website unless you have to. If you have to use them, at the very least consider compressing them using Ezgif.

    27. Resize Your Images

    I'm talking about the dimensions of your image, not the file size this time. Using smaller-sized images when appropriate is another way to reduce your image size and reduce the time it takes for a browser to receive the image.

    28. Replace Image Buttons With HTML

    Years ago, I built a site for a client of mine who requested a navigation bar with images instead of your usual HTML/CSS links. Image navigation bars take longer to load than HTML/CSS navigation bars for the reasons I mentioned previously.

    29. Limit 3rd Party Content

    3rd party content (sometimes) takes longer to load since it's loading from an external source, so limiting the amount of 3rd party content on your website can speed your website up a bit.

    30. Only Display What's Necessary

    Contact forms and social media links on every page of your site are superfluous on some websites. If your pop-up contact forms or sidebar contact forms aren't being used by your visitors, then consider getting rid of them.
     
    • Thanks Thanks x 30
    Last edited: May 24, 2017
  2. mindmaster

    mindmaster Jr. VIP Jr. VIP

    Joined:
    Sep 16, 2010
    Messages:
    2,765
    Likes Received:
    1,239
    Home Page:
    Another nice guide OP.
     
  3. SensualTyrannosaurus

    SensualTyrannosaurus Jr. VIP Jr. VIP

    Joined:
    Mar 19, 2015
    Messages:
    419
    Likes Received:
    401
    Occupation:
    Machinegun Troller
    Location:
    Conducting an LoL Shaped Ambush
    Home Page:
    Java in the header is kicking my speeds Ass. I'll be implementing as many of these as I can. Thanks for the guide.

    Posted via Topify on Android
     
  4. Zwielicht

    Zwielicht Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    7,119
    Likes Received:
    12,572
    Gender:
    Male
    Occupation:
    Reaper
    Location:
    Riverside, California
    Home Page:
    Thank you!
    I like the way you worded that. :)

    Here's another one I was going to update the thread with that you can try. If you have a Wordpress child theme, try using "wp_enqueue style" instead of "@import". It's supposed to be faster than loading the parent theme stylesheet using @import.
    http://mygenesisthemes.com/avoid-css-import-wordpress/
     
    Last edited: May 19, 2015
  5. Mind Media

    Mind Media BANNED BANNED

    Joined:
    May 17, 2015
    Messages:
    97
    Likes Received:
    19
    What a really nice share. This is going to help so many people now that google look at website speed as an seo factor.
     
  6. ivyleague

    ivyleague Newbie

    Joined:
    Aug 27, 2013
    Messages:
    20
    Likes Received:
    3
    I have a question about cloudflare. Do they have a lot of downtime? I've noticed some big sites using them but it seems the sites are down a lot and it says something like "no site cache available" so I was wondering if its reliable and the best cdn to use? But thanks for all the tips!
     
  7. LoftPower

    LoftPower Elite Member

    Joined:
    Feb 23, 2015
    Messages:
    3,186
    Likes Received:
    407
    thanks for the great tips you have given us here. I think that they will work great.
     
  8. waitier

    waitier Power Member

    Joined:
    Sep 5, 2013
    Messages:
    738
    Likes Received:
    202
    Be careful using cloudflare on your site. Improper setting can lead to them blocking legit visitors, and at times they act up and display erros while your site is actually up.

    Best way is to use them as DNS and not CDN. As long as your page isn't heavy, there's no need for CDN. But even as DNS, they could act up as well. There's the unproven myth that they are "DDOS magnet".
     
    • Thanks Thanks x 1
  9. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,504
    Likes Received:
    3,721
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:
    3. Change Web Hosts

    Step 3 all by itself gave me massive speed improvements, i switched from GoDaddy to Hostwinds. I would suggest this is the first thing you should do if you use godaddy as your host.
     
  10. HatArrows

    HatArrows Regular Member

    Joined:
    Jun 28, 2013
    Messages:
    430
    Likes Received:
    123
    Location:
    Data Mines
    Excellent share OP.
    Do you recommend using any site auditor to compliment these methods.
     
  11. xPuppet

    xPuppet Newbie

    Joined:
    Jan 8, 2015
    Messages:
    19
    Likes Received:
    2
    Well-Written and Newbie Friendly Guide! Broken into small parts for easy understanding.
     
  12. Zwielicht

    Zwielicht Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    7,119
    Likes Received:
    12,572
    Gender:
    Male
    Occupation:
    Reaper
    Location:
    Riverside, California
    Home Page:
    There's an option in Cloudflare that allows you to serve a static version of the site in the event that it goes down at the web host. I've only ever noticed my site on Coudflare go down once, but it was becasue the site went down at the server. Of course, as Waiter mentioned, you have to be careful with some of the settings on Cloudflare (especially the minify settings) as you could end up ruining your site.
     
  13. fishwalker

    fishwalker Newbie

    Joined:
    Nov 13, 2014
    Messages:
    49
    Likes Received:
    14
    great guide, I'll post how much my score improves
     
  14. telim2

    telim2 Regular Member

    Joined:
    Sep 7, 2014
    Messages:
    339
    Likes Received:
    145
    Thanks i will be implementing some of this on my website.
     
  15. fokec

    fokec Newbie

    Joined:
    Jul 22, 2014
    Messages:
    19
    Likes Received:
    4
    Nice guide OP, thank you for sharing it.
     
  16. ecloudic Stars

    ecloudic Stars Newbie

    Joined:
    Jul 2, 2015
    Messages:
    24
    Likes Received:
    2
    Gender:
    Male
    Home Page:
    Nice guide!!

    Awesome to read.....
     
  17. jiungsong

    jiungsong Jr. VIP Jr. VIP

    Joined:
    Jan 27, 2015
    Messages:
    1,918
    Likes Received:
    953
    Gender:
    Male
    Occupation:
    Living the IM Dream
    Location:
    California
    Going to try some of your methods and plugins above, thanks for the write up.
     
  18. PowerPath

    PowerPath Junior Member

    Joined:
    Feb 13, 2017
    Messages:
    175
    Likes Received:
    41
    Gender:
    Male
    Great guide!!!

    Going to implement some of these methods.
     
  19. Siddharth S

    Siddharth S Newbie

    Joined:
    Feb 16, 2017
    Messages:
    4
    Likes Received:
    1
    Gender:
    Male
    Thanks for sharing. Looking forward to trying this soon.
     
  20. Zwielicht

    Zwielicht Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    7,119
    Likes Received:
    12,572
    Gender:
    Male
    Occupation:
    Reaper
    Location:
    Riverside, California
    Home Page:
    Oh, I almost forgot about this guide!

    Well, since it's been bumped, I put updating this guide on my to-do list. :)
     
    • Thanks Thanks x 1