My last post was about how to speed up your site in general, so, as promised, here is specifically how to speed up WordPress.
WordPress, like many other content management systems, using PHP and MySQL as the backend to create pages. This works great on small sites as all changes and comments are displayed immediately. However, on larger sites, processing PHP and MySQL requests on every page load can kill your server pretty fast. So, the need for WordPress caching was created, and there are many plugins out there to do it for you.
My recommendation is WP Super Cache, as it’s really simple to set up, and does make a noticeable difference in page loading time. All you need to do is install the plugin, activate it, and enable the caching in the WP Super Cache menu, which is a sub-menu of the “Settings” tab in the admin panel. You can go into the advanced settings and enable the expert caching mode, which does further decrease server load, but this will not work for everyone, so I don’t recommend it unless you know how to configure it for your specific web server(if you use Apache,
.htaccess rules are generated).
Minifying your site may sound like a complicated job, or a lot of work, but it really isn’t. All you have to do is install a plugin called Autoptimize, and configure it. After you install and activate the plugin, you will see a new tab in the top bar of the admin panel called Autoptimize, with a green circle next to it. Click on that, and you will be taken to it’s settings page.
Now, enable the options one by one, and check your website each time. If one setting breaks your site, then disable it, but keep the other ones enabled. For the best performance, I recommend enabling the “inline and defer CSS” option, which will require you to show the advanced settings. You don’t have to put anything in the box, but you can put some critical CSS there so your site doesn’t appear broken as it’s loading(if this sounds complicated, don’t enable this setting).
If you can’t or don’t want to use Cloudflare, then there is another free option, for your images anyways. The CDN is called Photon, and requires you to install and activate the Jetapck plugin. This is completely free, but does require a WordPress.com account, and sharing a bit of information about your site with them.
After setting up Jetpack, which takes less than a minute, go into the Jetpack settings menu. This can be accessed by hovering over the Jetpack tab on the left section of the Admin Panel, and clicking on the settings option that appears. Then, scroll down to the “Speed up your site” section, and enable the “Serve images from our servers” option, which may or may not be already enabled. Also, in the same section, I also recommend enabling the “Lazy load images” option, which will only load images as they are made view-able within the browser window, decreasing the initial load time of your site(this won’t make much of a difference after the images are in the browser cache).
I still recommend using Cloudflare, even if you choose to use the plugins. Cloudflare’s caching and minifying options will NOT interfere with the plugins, and they provide much more than just a CDN. They also protect your site against DDoS attacks, and some other WordPress attacks. They have a free-for-life plan which will work for most people, until your site grows enough to make you more than enough money to cover their other plans, which further increase performance.
W3 Total Cache
Instead of using WP Super Cache and Autoptimize, you can also use W3 Total Cache, which handles both page caching and minifying your assets and pages. It has extensions that can clear your Cloudflare cache, add Yoast SEO support, AMP support, and more. Additionally, it offers many more types of caching, such as an object caching, database caching, and configuring the browser cache options.
If you’re interested in taking this route, WPBeginner has a good tutorial on this. After their tutorial, I recommend enabling minification, and checking if the object cache speeds up your site.