This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was experiencing performance issues on their site's archive pages, particularly with high load times and frequent errors. The WPML_Element_Translation->maybe_populate_cache() function was being called excessively, resulting in around 1,800 SELECT queries per request, significantly affecting site performance.
Solution:
We identified that the issue was related to the Adjust ID setting in WPML, which was trying to fetch translated IDs for menu items not set in other languages. To resolve this, we recommended the following steps:
1. Disable the Adjust ID option.
2. Navigate to WPML > String translation > Admin Texts Translation.
3. Locate the default language theme option for the main menu at [theme_mods_motors][nav_menu_locations]primary with ID 207.
4. Add this option for translation and assign the translated menu ID for other languages, such as French ID 253.
After applying these changes, the site's load time improved significantly, with pages loading in about 2.5 seconds even with cache disabled.
For further details on optimizing SQL queries, you can visit https://wpml.org/faq/how-to-optimize-mysql-queries/.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 17 replies, has 1 voice.
Last updated by 6 days, 23 hours ago.
Assisted by: Dražen.