I am trying to update the site hidden link using WPML, specifically focusing on modifications, translations, and menu synchronization. A developer identified that the WPML menu sync feature is resource-intensive, leading to Cloudflare timeouts. They attempted optimizations like clearing the PYS events queue table, installing WP-Optimize, logging database queries, running menu sync via CLI, and considering caching options like Kinsta's Redis cache. The issue seems related to the n+1 query problem due to the high number of menu options and languages.
Symptoms:
The menu sync feature in WPML is causing Cloudflare to time out due to high resource usage and a large number of database queries.
Questions:
Can WPML authors suggest a workaround or patch to make the menu sync feature less resource-intensive?
Is there a way to solve the n+1 query problem in WPML's menu sync feature?
Can WPML stream output to prevent Cloudflare from timing out?
1.- Please describe step-by-step how to reproduce the issue on the site.
2.- Share the access credentials to the site in your next message, which I have set private. This way, we will be able to reproduce the steps described in the previous point and check the configuration.
Confirm you have created a full site backup that you can restore if necessary.
Hi Jasmin,
Thank you very much for sharing the credentials requested.
I was able to reproduce the issue, and I will need to run more tests to isolate its cause. Therefore, I kindly ask you to create a staging site with a copy of the production site (you can use the WP Staging plugin for free), where we can run all necessary tests without affecting the live site.
I have set your next message private so you can share the credentials privately.