Hi there! This is indeed likely related to the number of products you have, combined with the server’s resources. In particular, if the products are variable and have a lot of variables connected, that will put a large load on your server’s capacities.
I recommend having a chat with your hosting provider to see if the resources can be upped, or that a switch to a different type of service is a good idea for you.
Hope that helps. Have a wonderful day ahead!
Thread Starter
mo7900
(@mo7900)
Hi @imazed
Thanks for your prompt reply. We contacted the host and even increased our resources heavily (we’re hosted in a private VPS), but the issue still persist, and they informed us to work with MySQL developer to analyze our DB, since the server we have is quite good to handle this load. With the MySQL dev, we found this issue, which is causing the time-out.
SELECT SQL_CALC_FOUND_ROWS
wp_posts.ID, wp_posts.post_title
FROM
wp_posts
LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id
WHERE
1 = 1 AND wp_posts.post_type = ‘product’
AND (wp_posts.post_status = ‘publish’
OR wp_posts.post_status = ‘future’
OR wp_posts.post_status = ‘draft’
OR wp_posts.post_status = ‘pending’
OR wp_posts.post_status = ‘private’)
AND (
( ( wp_posts.post_title LIKE ‘%iphone%’)
OR ( wp_posts.post_excerpt LIKE ‘%iphone%’)
OR ( wp_posts.post_content LIKE ‘%iphone%’ )
OR ( wp_postmeta.meta_key = ‘_sku’ AND wp_postmeta.meta_value LIKE ‘%iphone%’) )
)
ORDER BY wp_posts.post_title ASC
LIMIT 0 , 20
Of which, this part is really heavy: OR ( wp_postmeta.meta_key = ‘_sku’ AND wp_postmeta.meta_value LIKE ‘%iphone%’) )
I’m wondering if you can recommend us what we have to do to optimize this, as it’s quite heavy for even a regular MySQL optimizer to optimize at the moment. I’m sure there are websites with 20k, 50k plus products that are running on Woo.
Thank you!
Thread Starter
mo7900
(@mo7900)
this issue is caused due to WordPress. Cannot believe WP is yet to fix this as this has been reported 3 years ago (https://core.trac.wordpress.org/ticket/33885#comment:79) and dissapointed as well that WC hasn’t made an effort to push this with WP, as stores grow bigger, these are issues that needs to automatically be addressed between it’s partners, as we need WP to use WC.
Anyone who wants a fix for this follow the guide here: https://9seeds.com/wordpress-admin-post-editor-performance/
Thank you!