最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Slow page loads due to WordPress Core Query

programmeradmin2浏览0评论

I have a page with many posts and every single page load is noticably slow. Hence, I have checked with Query Monitor the culprit(s) for the slow loading time and found that one query in particular is taking 90% of the time.

This one query is:

SELECT ID
FROM posts
WHERE (post_content LIKE '%template=publish%')

This query takes 3-4 seconds everytime a page (frontend/backend) is loaded. This is not userfriendly as well as it puts a straing on the DB, too.

Since this query originates from WP-core, simply deactivating a plugin will not solve the issue.

Does anyone have any suggestions as to reduce/improve/cache the query? Unfortunately Object-Caching is not feasable on this site.

Edit: I have clicked the blue button which only shows that it is being called from wp-includes/plugin.php. The button is not for the component part, but for the caller.

However, it suggests that a plugin is actually calling it, since it is originated from plugin.php, correct? Any way to trace the culprit plugin?

Edit2: I have done the good ol' deactivate-all-plugins-and-activate-one-by-one-debug-procedure. It turns out, the plugin userpro generates that query. I will contact the author. Let's see what he has to say about that.

发布评论

评论列表(0)

  1. 暂无评论