This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported that their site was running slow due to WPML database queries, even after installing WP Rocket for performance enhancement. The specific slow query identified was impacting the site's performance by 0.8-3.0 seconds. Solution: We identified that the slow query was related to translation jobs in WPML that needed review but were not appearing as pending in the translation management. Initially, attempts to fix this using WPML Troubleshooting options were unsuccessful. We then executed an SQL query to remove over 100,000 old translation status entries from the database, which appeared to resolve the issue with slow queries. The SQL command used was:
DELETE FROM `wp_icl_translation_status` WHERE `status` = 9
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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. If further assistance is needed, please 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.
Background of the issue:
I am trying to address the issue of my site running slow due to WPML database queries. I have already installed WP Rocket to help with performance. Here are some screenshots and files of the queries: hidden link. The issue can be seen on this page: hidden link.
Also i have OTG installer, but when i click on "activate" doesnt activate
Symptoms:
The site is running slow due to WPML database queries.
Questions:
Can you help me fix the slow site issue caused by WPML database queries?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hi,
I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.
The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up the site and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.
The private reply form looks like this: hidden link
The next time you reply, click on "I still need assistance".
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I do see currently the following slow query, which has an impact of 0.8-3.0 seconds:
The query in question is:
SELECT COUNT(translation_status.translation_id)
FROM wp_icl_translation_status translation_status
INNER JOIN wp_icl_translations translations
ON translations.translation_id = translation_status.translation_id
AND translations.element_id IS NOT NULL
WHERE ( translation_status.review_status = 'NEEDS_REVIEW'
AND translation_status.status = 10 )
OR ( translation_status.review_status = 'EDITING'
AND translation_status.status = 2 )
This usually refers to the fact, that on WPML > Translations are many jobs available for review. The odd thing is, that there are currently not any pending reviews according to translation management.
I tried fixing this using the WPML Troubleshooting options but without success.
I had to run the following SQL Queries which deleted more than 100.000 old translation status entries from the table which seem to have been stuck there since 2024:
DELETE FROM `wp_icl_translation_status` WHERE `status` = 9
---
Is this the issue that you would like to report or are there further issues on other pages?
Hello, thanks for the report. I just noticed that everytime the site was slow it was due to wpml database queries. Here is a report of few weeks ago when site was being extremely slow: hidden link.
So I'd just need you to check all that and if possible try to fix or prevent the potential issues that might cause those big delays in the future.