Finding and Fixing Slow WordPress Database Queries
read more
Categories

Finding and Fixing Slow WordPress Database Queries


Slow SQL queries can crush your WordPress site’s performance. Sometimes, slow queries are a result of poorly-formed SQL that never should have been done that way. And sometimes, slow queries were actually fast queries at one point—but as the site grew older, the query got slower and slower, unable to keep up with the expanding database.

Regardless of how your SQL got slow, let’s take a look at a few ways to find and fix problem queries in WordPress.

Finding the source of slow queries involves 2 steps:

1. Identifying which queries are actually the slow ones.
2. Finding the code that is generating and executing them.

Let’s look at two plugins and one SaaS that can help us find slow queries.