admin管理员组文章数量:1122846
strangely my theme doesn't have the function that generates queries like this
SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'publish' AND post_type IN ('post', 'page', 'attachment') ORDER BY post_modified_gmt DESC LIMIT 1
however after I checked
mysql -e "show full processlist"
it has too many queries above
Is there any way to prevent this query from happening, it really overloads the website
Thank you very much
strangely my theme doesn't have the function that generates queries like this
SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'publish' AND post_type IN ('post', 'page', 'attachment') ORDER BY post_modified_gmt DESC LIMIT 1
however after I checked
mysql -e "show full processlist"
it has too many queries above
Is there any way to prevent this query from happening, it really overloads the website
Thank you very much
Share Improve this question asked Mar 31, 2024 at 15:15 Công Tử HuyếtCông Tử Huyết 134 bronze badges 4- Have you contacted the theme author? Just because you got the theme from a repo or a third-party site like ThemeForest, it doesn't mean it follows best practices. – Tony Djukic Commented Apr 1, 2024 at 0:55
- @Tony Djukic my theme was developed and written from scratch by me – Công Tử Huyết Commented Apr 1, 2024 at 3:05
- Ah, I misunderstood - are there any plugins installed? Go through your theme and disable queries in case any of them are doing so without your knowledge. – Tony Djukic Commented Apr 1, 2024 at 12:36
- @Tony Djukic, I think is core wordpress – Công Tử Huyết Commented Apr 2, 2024 at 5:13
1 Answer
Reset to default 1Searching on Google for the mentioned query, I believe your assumption that it is coming from WordPress is correct. This ticket can be found at https://core.trac.wordpress.org/ticket/31171.
In my opinion, you should check what requests are coming to your website and block bad bots/users who are making multiple requests (based on that ticket, probably you have multiple RSS feed requests).
Thank you,
本文标签: theme developmentDisable creating sort index SELECT postmodifiedgmt
版权声明:本文标题:theme development - Disable creating sort index SELECT post_modified_gmt 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736311803a1934869.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论