Background of the issue:
After we installed and activated WPML on our website, hidden link, we experienced a performance slowdown. We didn't have much issue in the development environment, but once we activated it on our production system, we have had persistent performance issues for many months already.
This is what we found to be one of the most repeating query by debug bar, but it does not seems to be especially anomalous: SELECT wpml_translations.translation_id, wpml_translations.element_id, wpml_translations.language_code, wpml_translations.source_language_code, wpml_translations.trid, wpml_translations.element_type 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_icl_translations tridt ON tridt.element_type = wpml_translations.element_type AND tridt.trid = wpml_translations.trid WHERE tridt.element_id IN(******)
where **** is various integer ids
Symptoms:
Performance slowdown after installing WPML, with higher CPU usage and database load, especially in the admin backend. he issue seems to manifest in generally much higher CPU usage on the WP server and also our database. The slowdown is most noticeable in the admin backend, since we have caching for most frontend stuff. Currently we are forced to upgrade our database and service instances to keep up, but this added a lot of cost to our server hosting.
Questions:
We want to know if there is any other things to check why wpml slow our server down so much and any solution to resolve the problem.
You are right, the repeating query does not look weird and if it does not take too long it does not seem to be the culprit of the performance problem.
You mentioned that the slowdown is mainly in the admin, it happens on any particular page/ pages? What's the load time with and without WPML in those pages?
It may be a compatibility problem. So, the first thing I'd like to try (in a staging or development environment) is the following:
• Temporarily disable all plugins except WPML, WooCommerce, and WooCommerce Multilingual.
• Switch to a default theme (like Twenty Twenty-Three).
• Test your shop’s performance with and without WPML/WCML. If it improves, reactivate your plugins one by one to isolate the conflict.
Do not try this in production or ❌ please make a full website backup before proceeding ❌
Let me know how this goes please.
Best Regards,
Otto
Let me know how it goes, please.