I'm using WPML on a WooCommerce site and am experiencing performance issues that appear to stem from repeated database queries, as shown by Query Monitor.
Some of the queries that are repeated multiple times per request include:
SELECT language FROM wp_icl_strings WHERE id = ... LIMIT 1
SELECT value, language FROM wp_icl_strings WHERE id = 0
SELECT * FROM wp_posts JOIN wp_icl_translations ... WHERE language_code = 'da'
These are triggered in multiple places, including:
WPML_ST_String->get_language
WPML_Query_Filter
WPML_Term_Query_Filter
apply_filters('wpml_get_endpoint_translation')
These queries are executed many times per page load and are having a noticeable impact on overall performance.
Could you please advise:
Are there caching mechanisms or filters you recommend to reduce duplicate string and language queries?
Is there a way to preload or cache icl_strings data
Are there any best practices specific to WooCommerce + WPML to minimize query overhead?
Any guidance or optimization tips would be much appreciated.
Best regards,
Symptoms:
Repeated database queries are causing performance issues on the WooCommerce site.
Questions:
Are there caching mechanisms or filters you recommend to reduce duplicate string and language queries?
Are there any best practices specific to WooCommerce + WPML to minimize query overhead?
May 5, 2025 at 11:39 am
The topic ‘[Closed] Repeated icl_strings and Translation Queries Causing Performance Issues (Query Monitor Report)’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.