Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 -
- 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 -

Supporter timezone: Europe/Vienna (GMT+02:00)

This topic contains 21 replies, has 0 voices.

Last updated by Bigul 11 hours, 31 minutes ago.

Assisted by: Bigul.

Author Posts
May 27, 2025 at 1:56 pm #17079004

FortunyShop

Background of the issue:
We are experiencing high CPU usage and significant database load on our WordPress site, which has been identified through Query Monitor as primarily originating from WPML. We have optimized our MySQL server configuration and use several caching and CDN systems, including Cloudflare, Varnish, Redis, and WP Rocket. Our site has 9 languages and about 800 products per language, using different domains per language. Our VPS server is 16 core and 32GB RAM.

Symptoms:
Very low performance on backend and frontend when pages are not cached. Frequent and slow queries involving wp_icl_translations, wp_term_taxonomy, and wp_terms tables. Excessive reads from wp_icl_mo_files_domains and large UPDATE wp_options queries with serialized data for _icl_cache.

Questions:
How can we optimize WPML to reduce high CPU usage and database load?

Are there specific configurations for large WooCommerce sites with many products and languages to improve performance?

What can be done to reduce the time it takes to save or duplicate a product in the backend?

May 27, 2025 at 3:27 pm #17079588

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Please try the following steps and let us know your feedback. This will help us narrow down the performance issue and troubleshoot it without affecting the live site.

a) Create a staging site
b) Switch for a moment to a WordPress default theme like 2025
c) Deactivate all the plugins that are not related to WPML, except WooCommerce & Query Monitor
d) Then check whether the issue exists or not
e) If the issue is gone, activate the plugins as a group of three or four to find which one has an interaction issue
f) Switch back to the original theme of the site

--
Thanks!

Bigul

May 29, 2025 at 3:07 pm #17088986

FortunyShop

Here i am with all the steps performed and a minimal staging site with a default WordPress theme (and only the necessary plugins active: WPML, WOocommerce and ACF + query monitor obviously).

The restult is always the same slow query:

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts JOIN wp_icl_translations wpml_translations
ON wp_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type)
WHERE 1=1
AND ( wp_posts.ID NOT IN (
SELECT object_id
FROM wp_term_relationships
WHERE term_taxonomy_id IN (7) ) )
AND ((wp_posts.post_type = 'product'
AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'acf-disabled'
OR wp_posts.post_status = 'private')))
AND ( ( ( wpml_translations.language_code = 'en'
OR 0 )
AND wp_posts.post_type IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','product','product_variation' ) )
OR wp_posts.post_type NOT IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','product','product_variation' ) )
GROUP BY wp_posts.ID
ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
LIMIT 0, 16

I have set up a mariadb-slow.log file to report slow queries and i can also find this one being often slow:

SELECT tax.term_id FROM wp_icl_translations wpml_translations
				JOIN wp_term_taxonomy tax
					ON wpml_translations.element_id = tax.term_taxonomy_id
						AND wpml_translations.element_type = CONCAT('tax_', tax.taxonomy)
		 JOIN wp_terms terms ON terms.term_id = tax.term_id WHERE tax.term_id != tax.term_taxonomy_id LIMIT 0, 201;

I have read that they lack "indexes" in the database, is it right?
Are there specific configurations in WPML that we could optimize to improve performance for a site like ours with 9 languages, multi-currency, multi-domain, and over 800 products per language?

It's really important for us to make it work, I can imagine there are bigger websites than ours, please advice on how they deal with WPML related performance problems.
Our difficulties are mainly in the backend (impossibile to work with products in this situation and requests often go on timeout after Save!) and also in frontend loading times when a page is not cached.

Please find a screenshot of Query monitor with the results.
I'll upload credentials for the staging area, which country are you connecting from? So I can white list it from the firewall.

Thank you for your support.

Screenshot 2025-05-29 165359.png
May 29, 2025 at 3:08 pm #17089002

FortunyShop

How can I send private messages with credentials? Thank u

May 29, 2025 at 3:22 pm #17089011

FortunyShop

Also as you can see from the screenshot there are a lot of duplicate queries, they're mainly from WPML: one from wpml-string-translation, a couple from woocommerce-multilingual but nearly all of them are from sitepress-multilingual-cms. The total is 262, quite a lot!

Screenshot 2025-05-29 172018.png
May 30, 2025 at 7:49 am #17090695

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the details. This needs further investigation. To clarify, in a minimal setup, are you experiencing the slow queries only on the frontend (e.g., the Shop page), or also in the backend? Please confirm.

I am enabling the private option for the next reply. Please share the credentials to access your staging (dev) site backend after taking a full site backup (mandatory).

Also, please allow us to install the Adminer plugin to access the database for deeper inspection.

--
Thanks!

Bigul

May 30, 2025 at 6:11 pm #17093188

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates and login information. I am attempting to upgrade the WPML plugin manually via FTP, as currently unable to upload or extract the ZIP file through the WordPress dashboard. Please refer to the attached images for more details.

One request: Please try the following steps after an hour. This will ensure the site connects properly with the WPML server and will also help us in debugging the issue.

- Go to Plugins>>Add New>>Commercial tab
- Click on "Unregister WPML from this site"
- Refresh the page
- Click on "Get a key for this site" (as a development site)
- Copy the newly generated code
- Visit back to Plugins>>Add New>>Commercial tab
- Register the site with the new key

--
Thanks!

Bigul

2025-05-30_23h21_19.png
2025-05-30_23h21_03.png
June 3, 2025 at 8:12 am #17100680

FortunyShop

Ok done,
Thank you

June 3, 2025 at 8:31 am #17100827

FortunyShop

In case you need it, I have a monthly subscription to Tideways, which analyzes all of the traffic and the queries in my server. If needed I will give you the credentials.

Thank you

June 3, 2025 at 9:30 am #17101216

FortunyShop

Here's a screenshot of Tideways backend.
(By the way when I try to EDIT a previous message I get nothing, just the page refreshing but cannot edit the message).
Thank you

Screenshot 2025-06-03 112832.png
June 3, 2025 at 5:19 pm #17103583

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. We will test this further and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

June 6, 2025 at 7:15 pm #17114896

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

I have done a few rounds of testing on your staging site. However, the slow queries persist after the initial checks. Now consulting with our team to get an expert opinion on this. We will get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

June 11, 2025 at 1:51 pm #17126242

FortunyShop

Hi, hope you have some news for me soon 🙂
Because unfortunately we are still struggling with slow queries.
Thank you

June 11, 2025 at 7:55 pm #17127737

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

We are still working on this, and the ticket has been forwarded to our second-tier team for further investigation. We will get back to you as soon as possible with an update.

In the meantime, I have one request: if possible, please upgrade to the latest version of WooCommerce. I am currently unable to perform the upgrade from the dashboard. Refer to the attached images for more details.

--
Thanks!

Bigul

2025-06-12_01h15_37.png
June 12, 2025 at 8:15 am #17128876

FortunyShop

Hi Bigul,
Ok done, updated everything.
Thanks
Matteo