My website is loading slowly – What can I do?

When a website is loading slowly, it is often thought that the server on which it is hosted is overloaded, but this is generally not the case. A website hosted on a very powerful server can still load very slowly if it is not optimised or coded properly. Depending on how your website is built, optimising it can be achieved in a number of different ways.

One of the first things you should try when trying to get your website to load quicker is to enable compression on your website content. Enable mod_deflate by adding the following code to the .htaccess file:

<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent

Next to try would be to review the ‘server response time’. As most websites built these days will have its content generated from a database, when someone visits the website it essentially needs to be ‘built’ by the server each time. To speed up this process, you can enable caching on your website. For any content management system such as WordPress or Joomla, there are a number of caching plugins/modules available. We would recommend a caching plugin in almost every case.

If caching is not available or suitable (as it may cause some issues the odd time), you might want to consider a CDN (content delivery network) to cache some of the content aggressively. With LetsHost shared hosting accounts, we offer Cloudflare for free and this offers both caching and a CDN service.

If you require further information/assistance on the above, please submit a ticket and a member of the team will be happy to assist further.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I unlock my domain name?

  When transferring a .com/net/org/info/biz/etc domain from one domain registration provider to...

How to set up a URL redirect on your domain

For information on how to set up a redirect in your LetsHost cPanel control panel, please see the...

How to change PHP version on my account

It is now possible to change the version of PHP in use on your hosting account. To do this, you...

How do I update the whois information of my domain?

Please see the following steps on updating the whois information for your domain: - Log in to...

Adding another domain/website to your Plesk hosting account

Your LetsHost Plesk (/Windows) hosting account will allow you to host multiple domain names or...