One of the most common problems that I hear about in regards to WordPress is speed. This applies not only to self-hosted sites, but also for sites hosted with companies like WPEngine. People spend a lot of money to have their site hosted by these companies because they are supposed to be faster and more secure than normal hosts, yet people complain that their WordPress site on one of these hosts is still slow. [I think the author might be better off cutting this part out due to its possible redundancy.]
If you’ve ever had this issue then you know what I’m talking about. Thankfully there are some things we can do about it. Some quick and easy things we can implement right away and others may require some time and coding.
I’ll start with the easy ones and then move into the more complex solutions if it’s needed. [The article goes without saying that you should not do all of these at once, but rather in stages. I think doing so is obvious enough.]
1 . Use a Faster Theme
This is one of the easiest things that you can do to speed up your WordPress site. Themes are all over the place these days and some perform better than others. So here’s what you need to do: instead of spending hundreds or even thousands of dollars, spend $50 – $75 for an excellent theme with great support like Avada , Enfold , or X premium themes. You’ll find that they are much faster than free themes because they have been tested very thoroughly by the developers who them. [I believe it would be accurate to say that the “theme” is not necessarily what is slowing down your site, but rather it could be poorly coded plugins or a theme which has not been well-optimized.]
2 . Optimize your Image Files
If you’re using images for posts on your site then they might be adding to the load time. You need to optimize them before uploading them into WordPress. There are online tools like TinyJPG and TinyPNG that will reduce the file size of your images without sacrificing quality. [You can also do this manually in Photoshop by going to: File > Save for Web (Legacy) and then select JPEG and/or PNG-8 as desired.] This can significantly help speed up your site.
3 . Use a Content Delivery Network (CDN) and/or Accelerated Mobile Pages (AMP) Platform
I can’t tell you how many times I’ve actually gone on to more than one host just so I could speed up my website. It’s sad but so true, but I’m not the only one who has done this. That’s because most hosting companies will charge more money for better quality of service which typically comes in the form of faster speeds. But if their servers are in a congested area then they might be slower regardless of what they promise you in regards to “super fast servers.” [Find out which areas have the slowest load times for your particular host.]
Luckily we don’t have to do that anymore. You can pick and choose which CDN or AMP platform you want and just implement it right into your website. This is a static site generator called Jigsaw and there’s also Surge . If you’re not familiar with what a static site generator is then let me explain:
Static sites are sites, such as HTML files, where all of the content is stored directly on the server as opposed to dynamic websites where the server calls an engine (PHP) so it can generate dynamic content before sending it back to be viewed by users. Because this process isn’t required for static sites they load much faster than their dynamic counterparts despite having more content/pages. [This is not a perfect analogy but you get the gist.]
In order to use these static site generators all you have to do is sign up for an account and install it on your web server. Then when you want to update or add new content all you have to do is generate the website and then upload the newly created files to your server, replacing any existing files in the process. [I would recommend doing this with a staging version of your site so that you can preview how it will look with changes before they go live.]
4 . Leverage Browser Caching [Doing this one before optimizing images would be the smart thing to do, generally speaking.]
By leveraging browser caching we’re telling browsers like Firefox and Google Chrome to cache the data they’re receiving so that it doesn’t have to be downloaded every time someone visits your site. You need to use a plugin in order to enable this functionality because most hosting companies disable it by default for security reasons. [Use something like WP Super Cache , W3 Total Cache , or Comet Cache .]
You do this by adding some lines of code into the top of your WordPress head tag area, which will look something like this:
5 . Leverage Browser Caching as much as possible
While browser caching is a great way to speed up your website, there are just some things that you can’t cache. This means that each time someone visits those pages they have to be downloaded again and again. Luckily there’s also another trick we can use is similar and it’s by using something called a content delivery network (CDN).
A CDN is designed to speed up websites by caching files so that they can be delivered faster than hosting them on your server or just using browser caching. The way this works is by having the data stored in multiple locations, which geographically dispersed, so that people can download it faster even if they’re using geographically disparate areas. [This makes sense when you think about how slow an interstate gets during rush hour.] These files are hosted through third-party servers and since there are multiple copies available users can choose which copy load fastest at their location. [It does make sense but I’m not totally confident in my explanation of how it all works
6 . Minimize HTTP Requests
The more things your computer has to download the longer it takes and in turn the slower your site load time will be. You can dramatically decrease this by reducing the number of HTTP requests you have to deal with. [Sounds good, but I haven’t added these so they don’t help me.] To do that you need to open up your stylesheet and look for CSS background images. [I’m not sure what he’s saying about css here] If you’re using a plugin like pretty link or Jetpack then chances are that there will be quite a few which is really bad for performance.
Instead of keeping all of those images on one line make them their own individual lines and remove the need to download each background image in a separate HTTP request. [This is probably not true, but I don’t know enough about css.]
You should also be removing any unused CSS from the bottom of your stylesheet because it’s just increasing the number of requests you have to make and thereby slowing down your site load time. [Someone who actually knows what they’re talking about needs to write this part!] If there are lines at the end that you aren’t actively using then delete them permanently . It will improve your site speed if you do. [I think he means change them to comments by wrapping them in /* and */ instead?]
7. Remove query strings from static resources (CSS and JS) [Maybe]
8 . Use caching plugins
While this isn’t always necessary, using some form of caching will definitely help improve your site speed dramatically. Some good ones are WP Super Cache , W3 Total Cache , and Comet Cache . They basically ensure that anything they can deliver from cache they do instead of loading something new each time which decreases load greatly. [All sound good.]
Again this is something you can do with plugins to further decrease load time. You can find a whole list of them here: WP best cache – speed up your wordpress site . Some good ones are Autoptimize , W3 Total Cache , Better WordPress Minify , WP Super Minify , and WP Smush It . [It seems like most of these plugins do the same thing…]
10. Leverage browser caching – Use expires or cache-control header directives
Basically what this does is tell the browser, “Hey any time you visit a page from this website I want it to remain in memory for amount of minutes.” This will make it so you only have to re-cache the page once per session instead of every time since normally that isn’t cached. You can use wordpress plugins for this or just put it in your .htaccess file which is an important file if you’re running WordPress on a host that doesn’t have any caching things built into it already like DreamHost, 1&1, or BlueHost. [This section might be outdated because of what we did with WP Super Cache.]