18 Easy Tips to Speed Up Your Website.
1. Use a CDN (Content Delivery Network).
Hosting your media files on a content delivery network is one of the best ways to speed up your site, and can often save up to 60% bandwidth and halve the number of requests your website makes.
2. Use WP Engine.
While researching our guide to the best web hosting, I setup response time monitoring for a range of different web hosting companies. I simply opened an account, uploaded a blank WordPress site with an identical theme, and then used a server monitoring tool to test the response time every five minutes.
3. Use a Caching Plugin.
If you’re using WordPress, one of the quickest and easiest ways to cut your page loading speed is to install a caching plugin like WP Total Cache or WP Super Cache. Of course, if you are using WP Engine, you can skip this point as they have caching built-in.
4. Add Expires Headers to Leverage Browser Caching.
If you’re not using WordPress, or you would rather not install another plugin to add Expires Headers and browser caching, here’s how to implement it manually.
5 Use a Good Theme (if Using WordPress).
Prevention is usually a better strategy than cure. To prevent lots of page speed issues in the first place, you should opt for a good host, a good CDN, and good theme/design.
6. Clean up Your Database.
One of the pitfalls with WordPress is that your database can get very messy very quickly due to saved drafts, post revisions, deactivated plugins etc. WP Optimize is a fantastic plugin that routinely deletes all of the stuff you don’t need that’s cluttering up your database.
7. Fix All Broken Links.
Broken links are not only a drain on bandwidth, but they’re also one of the surest ways to get a user to leave your site. One of our clients recently had several hundred 404 errors showing in Google Webmaster Tools. After fixing all of these, the average pages visited per user increased from 1.4 to 1.85 pages/visit, and there was a noticeable decrease in bounce rate.
8. Reducing Your Redirects.
While 301 (permanent) redirects are preferable to 404 errors (broken links), they’re still not ideal as they slow down the time it takes for the browser to reach the correct version of a page.
9. Minify your CSS and JS Files.
10. Replace PHP with Static HTML Where Possible.
PHP is great for making your site efficient and reducing the need to enter the same information multiple times. However, calling information through PHP uses up server resource and should be replaced with static HTML where it doesn’t save any time
11. Link to Your Stylesheets.
Similarly to the point above, @import uses up more resource than directly linking to your stylesheets despite achieving the exact same result. Another reason why not to use @import is that some of the older browsers do not support it, so it’s best to avoid it where possible.
12. Specify Image Dimensions
Before your browser can display your webpage it has to figure out how to lay out your content around your images. Without knowing the size of these images the browser work it out, causing it to work harder and take longer.
13. Specify a Character Set in HTTP Headers.
For the same reason as above, it’s useful to specify a character set in your HTTP response headers, so that the browser doesn’t have to spend extra time working out which character set you’re using.
14. Put CSS at The Top and JS at The Bottom.
15. Disable Hotlinking of Images.
When other website’s ‘hot link’ to your images it steals bandwidth, slowing your site down. To prevent other sites from hogging your bandwidth, you can add this snippet of code to your .htaccess file.
16. Switch off All Plugins You Don’t Use.
With WordPress sites, plugins are usually the biggest culprit for slowing the site down. If there are any plugins that you’re no longer using or aren’t essential, delete them.
17. Minimize Round Trip Times.
Round trip time is the time taken for the client to send a request and the server to respond. It’s affected by a huge range of things, but is primarily impacted by the number of requests that are being sent. As shown in the Pingdom screenshots at the top of this post, I managed to almost halve the number of HTTP requests that were being made, which massively reduced the round-trip time.
18. Use CSS Sprites.
A sprite is one big image that contains all of your images. They look similar to those sticker sets you used to get with one hundred stickers on a single sheet. Using CSS you can ‘hide’ everything in the image except for a section between a set of co-ordinates.
I hope this will help you.