The site was not loading and ny server proder send me the below
All of these slow queries follow the exact same pattern — they're generated by the CRED (Content Registration Entry Data) plugin in WordPress, looking up auto-draft posts by a unique hash title. the one generating all those CRED Auto Draft slow queries. This is your primary culprit.
The server logs show multiple slow database queries related to the Toolset Forms (formerly CRED) plugin creating and checking auto-draft submissions in the WordPress wp_3_posts table. How can i fix this, please advise
example of slow queries
SELECT wp_3_posts.ID
FROM wp_3_posts
WHERE wp_3_posts.post_status = 'auto-draft'
AND wp_3_posts.post_type = 'submission'
AND wp_3_posts.post_title = 'CRED Auto Draft [unique ID]'
AND wp_3_posts.post_author = 0
ORDER BY ID DESC
LIMIT 1;
Hello. Thank you for contacting the Toolset support.
CRED auto-draft generated when you try to creaate a new item using the Toolest form. But there is a CRON that runs and cleans/delete the unused auto-draft items automatically.
I need a test site where I can check and troubleshoot further.
You shared:
Execution Time Occurrences
30.223s 3
25.386s 1
25.081s 1
23.162s 1
22.595s 1
16.313s
===>
Where do you mean when the query run by cron or you any any other specific page that runs slow. If you have specific page, please share link of that page/post.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I see the following line of code within your site's wp-config.php file:
define( 'DISABLE_WP_CRON', true );
The reason why you have so many "CRED Auto Draft [unique ID]" posts because you have disable the cron. Toolset Forms offers mechanism that manages and delete to unused/unwanted such auto draft posts using CRON.
*** Please make a FULL BACKUP of your database and website.***
Please take full backup of your database.
Maybe you should check your databaase and you will has tons to posts available with post_status = 'auto-draft' AND post_type = 'submission'. You maybe clean it manually.