Marijan Gudelj

Ok so you have been working for a long time on your WordPress website. And it started to slow down. Now what?

So every now and then a WordPress website gets slown down. Especially if you have enabled the users registration, a lot of plugins, a webshop (WooCommerce).
Don’t get me wrong WordPress is a great out of the box CMS system.

But why is this happening

This is because most of the data is stored in 2 database tables. So imagine you have 100000 (one hundred thousand ) posts.
You are fetching only one post for you single blog post page. But the database still needs to go trough every one of those posts to find that individual post. This increases the time time needed to find the post, thus increasing the Time To First Bit (TTFB).

TTFB ideally for WordPress should be between 0.8s-1.5s depending on your “blog” size.

Also you must know that a poorly written plugin can downgrade your website performance

So what else increases TTFB?

Plugins. Sometimes some plugins are necessary to have a website functionality. Or some users don’t have the knowledge to do it without plugins. But consider this: even inactive plugins are loaded when your site is loaded.
How you ask?
Well WordPress checks if the plugin (that is also listed in the database) is active or not. It may have a small impact, but it is still an impact.
Also you must know that a poorly written plugin can downgrade your website performance.

What are my options if the website is slow?

There are many possibilities. I will list a few what can help you overall.

  1. Plugin organizer plugin
  2. Query monitor plugin
  3. Optimize your assets

1. Plugin organizer plugin

The name says it all. Basically you disable the plugins on the pages, post types, part of the url string etc. where you don’t need them.

An example would be Contact form. So contact form 7 is an excellent plugin. But you need it only on the contact page. You disable it on all other pages.

2. Query monitor plugin

This is an awesome tool that can help you find any plugin with poorly written query. It shows you all of the queries on the page, what are the slow queries, queries by type (plugins for example) and all other usefull information.

3.Optimize your assets

This to some comes naturally, while other forget it. You need to optimize your assets. Reduce images ( yes you don’t need images with 5000px width resolution).
Concatanate and minimize your styles and css. For that you actually need to include them properly ( wp_enqueue _script and wp_enqueue_style).
Don’t load fonts from urls (Google fonts, Font Awesome). Rather download them locally.
Cache the websites, gzip the websites. Do everything you know that can decrease the loading time.