Fixing slow MySQL Queries on WordPress

Recently I find out about the Query Monitor plugin , I highly recommend it to troubleshoot a slow WordPress site. It will tell you exactly why the site is slow.

I installed it on one of my website where I was using “Similar Posts” plugin. With more than 180,000 posts, the plugin slowed down the site. The plugin gave details about what exactly was causing the slow speed.

A query was taking 8 seconds on average. I tried tweaking my.cnf file for MySQL, but it made no significant difference.

Enable Indexes
Enabled Indexes on one of the column of similar posts table, and query time dropped from 8 seconds to 0.1 second.

Here’s the video:

Leave a Reply

Your email address will not be published. Required fields are marked *