7 Ways to Speed Up Your Website | HostGator Blog

HostGator Blog

Web Hosting Made Easy!

Blog / Web Hosting Tips

7 Ways to Speed Up Your Website

Sunday, January 8, 2017 by

How to speed up your website

There’s no doubt about it – website speed matters now more than ever before!

As average internet connection speeds increase around the world, web users are becoming less and less tolerant of slow load times.  At the same time, Google has stated unequivocally that it prefers to reward fast sites with higher positions in the natural search results.

To take advantage of these dual benefits, you need to make site speed a priority on your site.  Any of the following seven tips will help to get you started on this important path.

Test your HostGator server upload/download speed here!

Recommended WordPress Hosting

 

Tip #1 – Size images before uploading them

If you use a content management system (CMS) like WordPress or Joomla, you’ve probably noticed that you can upload images at full size and then adjust their display size within your website’s backend.  

However, doing so forces web browsers to execute multiple commands – pulling up the initial images and then re-sizing them on the fly – which can slow down your site.

To prevent this from occurring, use an image-editing program to adjust images to the correct size before adding them to your site.

Most of us will have access to a simple tool like Preview (on Mac), or even Microsoft Paint (on Windows). With these programs all you have to do is open up the image and re-size it in your editor of choice.

Once you’ve done this you can take your image editing to the next level with a compression tool. Even after re-sizing each image the total file size might be pretty large and this will slow down your site’s loading speed.

One of the best tools available is an online tool called TinyPNG. All you have to do is click the link, upload your re-sized image and this tool will reduce the file size without reducing the resolution.

TinyPNG image compression

Then, all you have to do is download the image and upload it to your site.

With this tool your images will look exactly the same and will load much faster.  

 

Tip #2 – Eliminate unnecessary plugins

The huge number of plugins and scripts that are freely available today makes it tempting for website owners to add more than they truly need. Keep in mind, every plugin you add requires resources to run – and more resources mean a slower site.

Before adding any new plugins to your site, ask yourself if the functionality you gain is worth the trade-off in site speed, or whether the plugin’s content could be coded into your site’s theme instead.

If you notice your site is running slowly, or you believe it could be running much more effectively, perform a plugin run-through.

This involves you disabling every plugin on your site, one by one. After you disable a plugin, run your site through a tool like GT Metrix. This will show you the speed of your website.

Google Page Speed

If you find that the speed of your site greatly increases after deactivating a plugin, then you’ve found your culprit. If you absolutely require that specific plugin’s functionality for your site to work, then experiment until you find another plugin that doesn’t affect the speed of your site.

Plus, getting rid of plugins can prevent plugin conflicts that arise when you have too many active plugins at once. The more plugins your site has active at any given time, then more likely their code may conflict and cause them to not work properly.

 

Tip #3 – Make sure your site’s scripts are up-to-date

Depending on the CMS or e-commerce platform your site uses, you may need to check back regularly to determine whether new releases of your site’s scripts are available.  

If they are, upgrade your site as soon as possible (making sure that you have a current backup file in place first).  Site script developers are always working on improving their code for future releases, particularly when it comes to site speed.  Updating your scripts to the latest versions could go a long way towards eliminating coded roadblocks that prevent your site from loading quickly.

Now, remembering to check-in and update your website can be tough. After all, you have so much stuff on your plate already.

Lucky for you this isn’t something you have to do on a daily basis. Often, once a month is enough to do a simple run-though of your site and install any updates that might be available.

If your site runs on WordPress, then you’ll find these updates within the Updates tab of your WordPress dashboard. Just one click and your site will install the latest software updates. No need for anything else on your end.

WordPress Updates

Set a recurring event on your calendar and set aside an hour every single month. Usually, it’ll take much less time than this, but it’s important to build the habit of always ensuring your site and plugins are running the latest version.

Plus, having all of your software up to date will help to patch up any holes that could lead to your site being hacked.

 

Tip #4 – Make use of CDNs

Content Delivery Networks, or CDNs, are vast networks of servers that are housed around the world. Typically, if you’re not using a CDN, then your users will have to access your web host’s server at its central location.

This can lead to slow site speeds, especially if your visitors are located far away from the central location of your server. Additionally, if you’re just using a single server, there’s a chance it could get overloaded and cause your site to crash.

CDN’s solve both of these problems by letting your users access a cached version of your site from the web host that’s closest to them. Better yet, if one of your server locations is overloaded, then they can be switched to a new server location.

The result? Faster load times that will make your customers and the search engines happy.

To get started, look into the CDN services offered by SiteLock TrueSpeedMaxCDN, or Cloudflare.

 

Tip #5 – Enable browser caching

Browser caching is a technology that allows a website visitor’s browser to store copies of your site’s individual pages so that, when the visitor returns in the future, the content can be called up from within the cache rather than reloading the entire page. This saves the number of resources used to display your pages, resulting in faster overall load times for your visitor.

The easiest way to enable browser caching is with a plugin like WordPress W3 Total Cache. To install this plugin on your WordPress site, follow the steps below:

  1. Navigate to your site’s Dashboard, then Plugins>Add New, and search for W3 Total Cache. Click Install, then Activate.
  1. Once the plugin is activated, navigated to the new Performance tab at the top or lefthand side. This is where you’ll control all of the features of the plugin.WordPress Dashboard W3 Total Cache Performance
  1. There are a ton of features that you can turn on or off with this plugin. If you want to fully configure this plugin, then check out this post by WPMU DEV.

Alternatively, talk to your web developer about ways to integrate browser caching into your server-side scripting. 

 

Tip #6 – Turn on Gzip compression

Gzip compression is a technology that minimizes the size of browser-based HTTP responses – sometimes by as much as 70%.  If that doesn’t make sense, don’t worry.

Long story short, using Gzip compression can speed up your site’s load times significantly.

There are three ways to turn on Gzip compression on your site.  You can:

1. Add the following code to your site’s .htaccess file:

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
 
# Or, compress certain file types by extension:
 
<files *.html>
SetOutputFilter DEFLATE
</files>
 

2. Add the following code to the top of your HTML or PHP page:

 <?php if (substr_count($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start(); ?>
 

3. Install a Gzip compression plugin like the W3 Total Cache tool for WordPress (just keep in mind what we said earlier about installing too many unnecessary plugins!).

HostGator Website Builder

 

Tip #7 – Keep CSS files at the top of your page and Javascript code at the bottom

Finally, keep your site’s code neat and tidy by adding CSS files to the top of your page’s code and Javascript snippets to the bottom when working with raw HTML pages.  

Adding your CSS files to the top of the page prohibits progressive rendering, saving resources that web browsers would otherwise use to load and redraw elements of your pages.  Adding Javascript to the bottom prevents your pages from waiting on full code execution before loading – leading to a faster browsing experience for your visitors.

Although these are only a few of the different techniques that can be used to speed up your site, they’re some of the easiest to implement.  This list is a great place to start if you notice your site slowing down.

 

Having said all of the above, sometimes a slow site is simply caused by inadequate hosting. With HostGator, your site will be served from industry-standard technology and backed by 24/7/365 award-winning technical support via email, telephone, and LiveChat. We make it painless to transfer and are happy to assist every step of the way.

Get Started With HostGator!

Kevin Wood writes about technology and human potential. You can find him at his virtual homes Wooden Writing and Counter Culturist.
20 Comments
  • Alcaponi Orlando Fuorioso
    26 March 2013 at 6:46 pm

    very useful,thank you

  • CarloLoretta
    27 March 2013 at 2:05 pm

    Hi, to enable Gzip compression should be active the deflate module of apache? how can I know if this module is active?

    • HostGator
      27 March 2013 at 2:17 pm
      • CarloLoretta
        27 March 2013 at 2:54 pm

        Thanks! But under the “software/service” don’t exist “optimize website”. I need to enable something from the WHM panel?

        • HostGator
          27 March 2013 at 10:38 pm

          If you are a Reseller or VPS/Dedicated customer, you may need to enable this as part of the Access Control List, or ACL, within WHM. Conversely, it may also be located within the “Tweak Settings” section of WHM.

          • CarloLoretta
            28 March 2013 at 5:10 am

            Thanks!

          • CarloLoretta
            28 March 2013 at 6:32 pm

            Hi I can’t fint ACL or Access Control List, “Tweak Settings” help said -> Compress interface pages using gzip compression, reducing bandwidth usage for cPanel and WHM.

  • Trace Jones
    13 May 2013 at 12:04 pm

    I know some people who add so many plugins but just leave them unactivated, clogging their site quite a bit. Get rid of those if you’re not using them. It’s important to update and sift through things on a site continuously.

  • johng
    25 May 2013 at 11:24 am

    Interesting. But I’m not convinced load time is a top concern for Google placement, and here’s why. My old HTML sites, which load at lightning speed because there’s no database to access, don’t do as well in Google as my WordPress sites. Google has always seemed to love WordPress, even though it’s slower, even when you use a low-data theme.

  • Local SEO Services
    3 July 2013 at 5:52 am

    There is always a confusion about how we got it :: “There’s no doubt about it – website speed matters now more than ever before”.

  • Venkat Mallick
    24 August 2013 at 6:06 am

    I really like to play with .htaccess commands and these are one’s i never knew about. Very good post.

  • Ray
    16 November 2013 at 9:23 pm

    This was AWESOME!! Thank you so much for the fantastic article

  • paulyiorkas
    9 December 2013 at 8:39 am

    An easy to understand articel for the non-techies ! Thank you !

  • karol Wickert
    9 December 2013 at 8:32 pm

    For tip #7 : Is there a wordpress plugin or better how can this be done in WHM.
    Thanks.

  • Hoa Sen Vàng
    13 February 2014 at 11:14 pm

    Things can accurately on most websites today, the open source solution provides website acceleration and turning it into a website run faster, I think that at this map and think it is the most basic

  • Cello Twain
    14 February 2014 at 6:38 pm

    oh my God it is so much faster thank you hostgator !

  • Danielle Kwint
    18 March 2014 at 9:22 pm

    WP HTTP Compression does not work anymore plugin is out of date

  • Akash Agarwal
    25 March 2014 at 2:14 am

    It’s a great guide to me. I definitely apply these strategies to speed up my website. Thanks for sharing this helpful post.

  • willywwilly
    10 January 2017 at 12:41 pm

    yo compre el certificado pero me indican que no es compatible con mi plan

    • Amelia Willson
      11 January 2017 at 11:07 am

    Leave a Reply