The speed and performance of your website is more important today than ever before. Users’ expectations have grown and their patience has decreased. If a website loads too slowly, users will quickly move on to another site rather than waiting another second or two. Even if users do not run away, a slow site will leave them disappointed, frustrated, and likely to abandon your site even in the midst of shopping. If you’re asking the age old question – how to make my WordPress site faster – we’re here to answer it!
Furthermore, Google has clearly stated that the speed of a site will affect a site’s ranking in the search results. So in order to keep both your users and Google happy, it is important to pay attention to site speed.
5 Fundamental ways to improve site speed
1. Use a good web hosting plan
It really all starts with choosing the right WordPress hosting plan with the right hosting company. Even before talking about speed, you must have a reliable company with solid and reliable hardware to host your website. If you site is unreliable, it doesn’t matter how fast it performs. Visitors will run away and never come back. Do your homework and check out user reviews for hosting companies.
Getting back to speeding up your website, most hosting companies, such as Bluehost, offer a range of hosting plans, starting with inexpensive shared hosting and moving up through virtual servers, dedicated servers, and cloud servers. The prices increase as you move up through the different types of hosting, but the number of resources dedicated to your website also increase. While it is OK to begin with shared hosting when you are just starting your site, be sure to regularly track your traffic volume and resource usage so that you can upgrade to a better hosting plan before visitors start noticing your site being sluggish.
2. Enable caching
Simply put, caching is the technical term for storing data in a temporary storage area. This improves a site’s performance since a lot of a page’s content is already prepared and available and does not need be fetched and processed in order to be displayed for a user. It also reduces the load of various system resources on your server.
We recommend you use the caching plugins provided by Bluehost, that are built to work best in that environment. You can find these cache settings in the performance page of the Bluehost plugin or WordPress section of the control panel.
If your site is not a WordPress site, enabling caching is more complex and beyond the scope of this article. In either case, you should discuss caching options with your hosting provider, since they will often have recommendations based on the optimizations they have implemented on their end.
3. Use a content delivery network
These elements are then delivered to visitors from a server closer to their physical location. For example, if your website is hosted on a server in the U.S., visitors from other parts of the world will have to have to wait a (relatively) long time for your content to reach their browsers. With a CDN, that time is reduced dramatically, since the static content will be provided from a local server much closer to them instead of one from across the world.
Bluehost offers the TrueSpeed CDN inside the control panel.
4. Optimize your images
For your images to load as quickly as possible, it is important to resize them before uploading them to your website. Don’t upload images larger than what you actually need to display. Scaling images in the HTML code might display them as desired, but it won’t reduce its original file size. For example, a JPG image that is 800×800 pixels with a 100kb file size will take just as long to load when coded to display at a 200×200 size as it would if you displayed it at full size. If you optimize the JPG to only 200×200 before you upload it, you might be able to get it down to 20kb and reduce the load time significantly.
As users come to expect higher quality images on websites, image size becomes more of an issue for page speed. Most images can be reduced in size using either graphic-editing tools or plugins without a web user noticing any reduction in quality.
Here are the important things to remember:
- Google recommends using WebP or AVIF image types.
- Crop your image to eliminate unnecessary elements and reduce size.
- Resize your images. There is no point in uploading a 2000 pixel-wide image if your web page is only 600 pixels wide.
As you might expect, there is a selection of plugins for WordPress websites, such as WP Optimize, LiteSpeed Cache, W3 Total Cache, Hummingbird, Fast Velocity Minify, WP Fastest Cache, and many others. Also note that many CDNs and caching tools offer built-in minify support.
Bonus ideas to optimize and speed up your WordPress website
1. Leverage browser caching
In order to leverage browser caching, create a file named .htaccess at the root of your blog (ie.: /public_html/path/to/blog).
If an .htaccess file already exists, append this code to the end of it:
AddType image/x-icon .ico
<IfModule mod_headers.c> # YEAR <FilesMatch ".(ico|gif|jpg|jpeg|png|flv|pdf)$"> Header set Cache-Control "max-age=29030400" </FilesMatch> # WEEK <FilesMatch ".(js|css|swf)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # 24 HOURS <FilesMatch ".(html|htm|txt|php)$"> Header set Cache-Control "max-age=86400" </FilesMatch> </IfModule>
Another option is to add an Expires header by appending this code to your .htaccess file:
AddType image/x-icon .ico
Using the htaccess directives above will instruct web browsers to cache files for a period based on file type:
- Image files: 1 year
- HTML and PHP files: 24 hours
2. Enable GZip compression
By enabling GZip, the web server will compress files on the fly before sending them to the web browser. This significantly reduces the total size of a web page. In some cases, GZip is enabled by default by the web hosting provider. But if that’s not the case, you can add this code to your .htaccess file:
3. Limit the number of posts and feeds per page
Limit the number of posts presented per page and the number of feeds shown. Around 5 posts is usually a good rule of thumb, but this can vary depending on your typical post length.
4. Limit the number of images and heavy media files
Limit the total number of images and other media on your page. Of those you do use, make sure they are as small a file size as possible. If you use a lot of images, keep a few of the most important directly visible on your posts and keep the rest as click-able thumbnails.
5. Adjust your Permalinks
Steer clear of settings that are “not recommended for performance reasons.” Check possible options here: http://codex.wordpress.org/Using_Permalinks
6. Remove old plugins
Don’t keep old, extra plugins or themes around. Hoarding plugins slows things down. Old plugins can also cause security issues. Throw out anything you can possibly get rid of.
7. Enable FastCGI
Depending on your website, this can help a great deal. Test your site before and after to notice the difference. You can enable FastCGI in the PHP Config icon in the cPanel. (Also try the ‘Optimize Website’ link in cPanel and enable mod_deflate.)
8. Test and dig deeper
There is really a lot more to site optimization than what we’ve discussed here. However, these are five steps that will give you the “most bang for the buck.” For those of you who want to learn more and/or further optimize your website, I’d like to leave you with a list of three popular performance analysis sites (all with very useful free versions). These tools will run a series of tests on your site to identify performance issues and direct you as to how to correct them.
Each of these sites will run different tests and display the results and scoring in different ways. They are generally easy to understand and offer clear explanations and suggestions.