If your website is loading slowly, there could be a number of reasons causing the delay in your load times. A site that’s loading slow or not running very smoothly can not only be frustrating, but it can also have a devastating effect if your site is business related. Visitors can get frustrated and leave, quite possibly to never come back. A slow site will also not rank very well on search engines, either.
Why is my Website Slow?
Determining the root cause of the problem is something that needs to be done quickly. Some of the most common reasons for websites running slow are as follows:
- A sharp increase in the amount of traffic your site gets
- Graphics, photos and images that are not optimized
- Databases that are not optimized
- No caching system in place for code, scripts, or resources
- A poor connection
- Too many processes, scripts, or plugins running simultaneously
- Too many redirects in the http request
- Errors in site code
- DNS misconfiguration
- Page composition and structure
- Site configuration
- In rare cases, server problems
- Poorly written or outdated scripts, website code or plugins or themes
Use cPanel to Optimize Your Website
cPanel offers you the ability to Optimize your website. Once you are logged in to cPanel, you can elect to use the Optimize Website that is found in the Software section. This setting changes mod_deflate usage by Apache only and you are able to choose to compress all content, or specific MIME types. For PHP scripts, you may also choose to enable zlib.output_compression through the Multi-PHP Editor to enable this feature. After enabling this feature, it is important to measure the results of your page load times.
What Makes my Page Load Quickly?
The key factors to causing a web page to load quickly are generally all related to optimizing the programming and code of the site itself, rather than any server configuration options. The first step is to ensure that you have all the latest updates as these can contain important updates. There are many tools on the web that can help you identify which elements of your website are causing the biggest slowdowns. Two tools you can use are Pingdom’s Website Speed Test Tool and GTMetrix Website Analyzer. Both tools provide insights as to which server requests or files are causing the largest problems, and some general advice in how to resolve them. This article will use results from Pingdom as examples. Some of the best ways to speed up your site code are as follows:
Make Images Internet-Friendly
If you’re wanting to show off pictures or images on your website, the suggested way to store these is to have them only be as big as they need to be. For example, if you’re using a picture for a 100 x 100 px profile image, it is best to save that picture on the server at 100 x 100 px; if you save the picture as 1000 x 1000 px, the server will take longer to not only upload the image to the page, but also resize the image and compress it down to fit. It’s advised to have a number of sizes for each picture saved, with thumbnail versions used more often than full-sized images.
This website only loads 13 files, but because it’s using very large images, it takes over 11 seconds to load the page! Adjusting the size of the pictures to be only as big as the site will display them, or even changing the file format from .PNG to .JPEG could save considerable load times, especially on sites with many images per page.
Use Plugins Sparingly (WordPress Only)
Having plugins can make your website really stand out, but having too many plugins can cause more problems than necessary. Only install and use plugins you are actively using, and limit your plugins to as few as your site can get away with. If possible, get around using plugins altogether (Example: the Google Analytics plugin – instead, just add the tracking code to your website footer manually).
This website is loading dozens and dozens of WordPress plugins, and each of those plugins has multiple files they need to load as well. Pingdom has rated the load times associated with these plugins as an F with a score of 0, which means they are definitely slowing things down. We recommend trimming plugins that are not used often or aren’t necessary for the site. Another trick is to see if there is another, faster plugin that will replace a slower plugin, or even replace more than one plugin at a time.
Cut Down on External Scripts
Every time your code has to reference an external script, it requires additional server resources and time to fulfill the request. As with Plugins, try and use external scripts as sparingly as possible, and if able try to include the snippets of code directly into your website code if possible.
This website spends over 8 seconds loading up a special font from an external source, slowing down the web page dramatically. This can be fixed by downloading the fonts to the local website folders. Since this website relies on another website to supply the fonts, if the other website is slow, has a bad connection, or goes down, this website is affected as well.
On the left is a website loading up a normal CSS file, and it takes 0.456 seconds to load just this file! On the right is a CSS file that has been minified, and its ten times faster at 0.047 seconds! It may seem like a small change, but if your site loads multiple CSS files, it could mean the difference between 5.0 seconds, and half of a second in load times.
For more detailed tips and tricks to speed up your website and the page loading speeds, review our handy Tips and Tricks to Faster Websites guide.