Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where WPML String Translation is running too many slow queries, as reported by their hosting provider.
Solution:
If you're encountering similar issues, we recommend the following steps:
1. Create a backup of your website, or ideally, test these changes on a staging version to avoid disrupting your live site.
2. Navigate to WordPress Dashboard > WPML > Settings and ensure you select the first option for custom post types, especially for 'products' which currently might be using a less optimal setting.
3. Go to WordPress Dashboard > WPML > Support > Troubleshooting and perform the following actions:
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Cleanup and optimize string tables
- Click on "Clear invalid strings" to delete unused or invalid strings.

These steps should help reduce the number of slow queries generated by WPML String Translation. If this solution does not apply to your situation, 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. If issues persist, please open a new support ticket.

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.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by jerisscloudcenter 4 months ago.

Assisted by: Christopher Amirian.

Author Posts
July 13, 2024 at 2:42 pm #15947546

jerisscloudcenter

Background of the issue:
My host is reporting that WPML String Translation is running too many slow queries.

Symptoms:
WPML String Translation is reporting a lot of slow queries, according to my host support.

Questions:
Why is WPML String Translation running too many slow queries?
How can I optimize WPML String Translation to reduce slow queries?

July 14, 2024 at 6:24 am #15949485

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

It is honestly hard to know why this is happening.

What I can suggest at the current stage is to do as follows:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to WordPress Dashboard > WPML > Settings and make sure that you select the first option for the custom post types and not the middle options. I see the "products" post type uses the middle option.
- Go to WordPress Dashboard > WPML > Support > Troubleshooting link and click the buttons below:

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Cleanup and optimize string tables

On the same page click the "Clear invalid strings" button and you will be redirected to a section where you can delete unused/invalid strings.

These are the options that I have in mind.

Thanks.

Screenshot 2024-07-14 at 10.20.27.png
July 14, 2024 at 10:12 am #15949924

jerisscloudcenter

Hello,

I did all the actions you suggested except the one below :

- regarding the custom post types, what difference does it make to use the "middle option" ? What impact does it have in terms of performance from the backend ?

Thanks

July 15, 2024 at 3:42 pm #15955441

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

We have found out that if you choose the middle option it will have duplicate queries and it has an impact.

That problem is under investigation and it should be fixed in upvcoming releases but for now I thought it would be a good idea to do so.

Thanks.

July 17, 2024 at 8:46 pm #15968429

jerisscloudcenter

Ok then I will wait for the fix in the next releases.