If your website is getting more hits than expected, or if you’re on shared hosting, it’s possible that your web server could have trouble keeping up with requests. This generally results in your website taking a bit too long to load for your visitors – and that’s bad.
There are many ways to fix a website speed issue – it’s best to explore all options within your budget to ensure that your site is running as quickly as possible.
1) Clean things up
Most of the WordPress sites we optimize come to us with dozens of outdated plugins installed, a purchased theme, and some very messy code. The first thing we do is clean that up:
- Update everything.
Backup your database and files, then update the WordPress core and any installed plugins.
- Uninstall unused plugins and themes.
Just because you’re not actively using a plugin doesn’t necessarily mean that it isn’t using server resources – deactivate and delete plugins you know you don’t need, and delete all inactive themes.
2) Replace simple plugins with code
You may not be able to tackle this one without help from your friendly neighbourhood web developer, but replacing plugins with custom code can sometimes save quite a bit of overhead. If plugins are being used for smaller functionality like favicons, social sharing, related posts, or even emojis, there’s a chance that you can replace them quickly and cost-effectively.
A good way to see which plugins are eating up processing time is to run Plugin Performance Profiler. Just be sure to disable or uninstall it when you’re done testing.
3) Optimize images
While large images won’t affect server processing time, they will eat up bandwidth and slow down overall page loading time. We use EWWW Image Optimizer to process all of the images in the Media Library, and the images uploaded to the theme directory.
4) Merge and minify code output
5) Install a server-side caching mechanism
A quick way to avoid server processing time when loading a page is to do that processing ahead of time. We use WP Super Cache on certain websites because it can pre-load the cache, and almost always serve a static version of the requested page to users. The setup is pretty quick, and you’ll notice a huge decrease in load time.
6) Use a proxy-based CDN like CloudFlare
If server-side caching isn’t enough, you can always offload the work to a third-party Content Delivery Network. CloudFlare helps speed up our sites by caching all resources, and serving them to our users, meaning that the number of requests that our server actually handles is very low.
Added benefits like optimization, security and analytics don’t hurt, either.
7) Test, optimize, repeat
Additional testing and optimization are done when we’ve tackled the six items above. There are many useful testing services out there, but we prefer GTmetrix because it tests Google PageSpeed along with YSlow, and gives us a Waterfall Chart so we can track the loading time for each resource.
Once we’ve taken care of as many items as possible, we re-test, repeat as necessary.
8) Wow, that’s fast
In the end, your site should be dramatically faster! Sit back and enjoy the speed.