In search engine fastest website rank higher than the slowest website. Here is the best tool for test your website speed performance:
Rate your website with your website load time:
Below 1 second = perfect
1-3 seconds = above average
3-7 seconds = average
7+ seconds = very poor
If your website is too slow, Below are 10 ways to speed up website performance:
#1 Leverage browser caching
This means the amount of data the user’s browser has to download is less, and fewer requests need to be made to your server. The result? Decreased page load times. You can install the following plugin to enable leverage browser caching on your WordPress website.
Or you can manually enable browser cache in your website, add the following line in your website .htaccess file
#2 Optimize Image
Images are larger in size which means they take longer time to load and can slow down your website. To speed up your website, you need to optimize image of your website. The best way to compress your website image by using Photoshop or other image editing software before you upload the image to WordPress. If you aren’t comfortable working with image editing software, you can easily compress your website image using TinyPNG.com.
If you are using WordPress, there are several image compression plugins that can help you to optimize your website image.These plugins optimize your images by automatically compressing them. You can install the following plugins to optimize your WordPress website image:
- Smush Image Compression and Optimization
- EWWW Image Optimizer
- Compress JPEG & PNG images
- ShortPixel Image Optimizer
#3 Enable Gzip Compression
Gzip Compression is a simple method for compressing your website’s files to save bandwidth and speed up your website.If you enable gzip compresses on your website, this can reduce the size of pages by up to 70%. Since 90% of Internet traffic travels through browsers that support Gzip, it’s a great option for speed up your website.
You can enable Gzip Compression by adding the following code to your .htaccess file:
Or, you can use following php code to enable Gzip Compression to your website:
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
If you are using WordPress, you can use WP fastest cache plugin to enable Gzip compression.
To check your website Gzip is enabled or not, you can use Checkgzipcompression.com.
#4 Minify your CSS and JS files
#5 Optimize Your Database
Optimizing your website database cleans up unwanted data which reduces database size and improves performance.You can speed up your website by regularly cleaning up your database. It is always a good idea to keep your databases’ tables optimized. If you are using WordPress you can install WP-Optimize plugins to automatically optimize your website database.
or You can optimize your website database using phpMyAdmin. Go to your website database from phpMyAdmin. Then you need to check the box for Check All / Check tables having overhead and choose Optimize Table from the drop-down menu.
After you’ve optimized your database you’ll most likely notice that the size of your database has decreased–this is a good thing.
#6 Enable Keep-Alive
HTTP Keep-Alive or HTTP persistent connections allow the same TCP connection to send and receive multiple HTTP requests and it helps to reduce the latency for subsequent requests.
Enabling Keep-Alive connections in Apache
Apache enables Keep-Alive connections by default. If Keep-Alive is not enabled, you can turn them on by adding the following line to your web server
If your website is running on a shared hosting, you probably won’t have access to
httpd.conf . So you need to contact your hosting provider to enable Keep-Alive Or You can try following method.
Enable keep-alive using .htaccess
If you don’t have access to your web server config file you can enable keep-alive yourself using an .htaccess file.
<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>
#7 Avoid bad requests
Broken links result in 404/410 errors. Too Broken links inside your content affect your website speed. These are wasteful, unnecessary requests can make a bad user experience and make your site look unprofessional. If you want to speed up your website, always to fix your website broken links. You should scan your website broken links using Online Broken Link checker or Google Webmaster tools for free.
You can easily fix your WordPress broken link using Redirection plugin.
#8 Remove Unnecessary Plugins and Add-ons
Plugins and Add-ons can extend functionality or add new features to your websites. But unnecessary plugins and add-ons can slow down your website. If you are CMS link WordPress, Joomla or Drupal, you need to pay attention to them. A lot of crappy plugins add extra database queries, scripts and styles to every page on your website. So do not install unnecessary plugins and add-ons on your website.
In your WordPress website, you can install P3 (Plugin Performance Profiler) Plugin. This plugin will scan all of your WordPress plugins and It will give you a report so that you can see which plugin reduce your website load time.
#9 Use CDN (Content Delivery Network)
If your website hosted in the US, This website will be faster for the people of US but your website will be slower for the people from countries. A CDN solves this problem by distributing your website files to across a network of servers in different locations of the world. So that someone trying to visit your website from Bangladesh will get download your website content from a closer server. This will significantly increase your website speed. CDN can increase website speed by up to 60%.
Here is the list of best CDN provider: