How to speed up your site(Part 2)

How to speed up your site(Part 2)

My last post was about how to speed up your site in general, so, as promised, here is specifically how to speed up WordPress.

Caching

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, but on larger sites, processing PHP and MySQL requests 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 it 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).

Minification

Minifying your site may sound like 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 Autopimize 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.

CDN

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 viewable 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).

CloudFlare

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 CloudFlare provides more than just a CDN. They also protect your site against DDoS attacks, and 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

You can replace WP Super Cache with W3 Total Cache, but W3 Total Cache is more complicated to set up. I would recommend still leaving the minification to Autoptomize as it will also defer the scripts, decreasing the time until the essence of the page is displayed.

Update– I recently switched to the Breeze caching plugin by Cloudways, and it handles caching and minification.

Leave a Reply(Markdown is On)

%d bloggers like this: