Main Content

Don’t tell me WordPress is slow. Improve your code.

WordPress logo on a blurred background.

There’s a lot of push for headless WordPress, or converting over to static site generators. Whereas they are nice, and they have their place, they’re not always needed. Instead of putting the effort into something new, why not optimize what you have? I have done just that and Lighthouse shows my scores are all excellent.

All Green Lightspeed Scores

I’m running WordPress, using Gutenberg, and using a 3rd party theme that is pretty outdated and still, I’m able to achieve fantastic speeds. So, how did I do it?

The first step in increasing my performance scores was running Lighthouse and seeing what it said. Lighthouse can give you some good insight into areas you should look into making improvements. Start tackling the ones you can control.

Next, checkout your 3rd party scripts. Things like ads, analytics, anything coming from 3rd parties can really slow your site down. I moved most 3rd party scripts to Google Tag Manager, so I could manage those in one external script call. This really helps. For me, removing Google AdSense was huge as well. I know not all sites want to remove their 3rd party scripts, but it’s a good time to see how you can either optimize or minimize them.

I then took a look at my plugins and decided if I really needed them all or not. Much like 3rd party scripts, some were good ideas back in the day, but now do I really need them? Simplify. Disable and delete any plugins no longer need. While you’re in there, make sure they’re all up-to-date as well.

I also took a look at my theme and started ripping out all the parts I don’t use. Most third-party themes have more options and code than you really need. That makes them flexible, but if you’re not using it, then why do you have it? This can get a bit more complicated, but if you know code, don’t be afraid to take over the theme and make it yours.

The biggest performance boost however probably came from the LiteSpeed Cache plugin. Like most plugins, there are a lot of settings, but most are fine out of the box. I don’t remember all the settings I changed, but I did set up their QUIC.cloud CDN. I just use the free tier, but every little bit helps. I’ve used many caching plugins in the past, but LightSpeed seems to be one that makes a big difference for me. Plus it’s free.

At the end of the day, it’s all about fixing, simplifying, and caching what you have. Chances are there’s a lot of excess that is slowing your site down. Cleaning it up, rewriting some code, and adding a good caching plugin can make a huge difference in performance.


Leave a Reply