Skip Navigation

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

Problem:
The client is experiencing slow site response times of 10-12 seconds when using the WPML and String Translation plugins. The issue persists even after upgrading the server, enabling caching, and creating a staging site. Deactivating the String Translation plugin resolves the issue, indicating it as the source of the slowdown.
Solution:
We performed several steps to address the issue:
1. Ran the WPML troubleshooting option to "Cleanup and optimize string tables" at WPML > Support > Troubleshooting, and created the necessary custom language MO files at /wp-content/languages/wpml, which improved site performance.
2. Suggested cleaning up the database by following the steps outlined in this documentation. This includes installing a recommended plugin and running the cleanup process multiple times.
3. Provided a SQL query to delete untranslated strings from the WPML String Translation:

DELETE FROM wp_icl_strings WHERE status = 0;

4. Identified that the custom theme significantly increases load times when enabled. Recommended switching to a default theme like Twenty Twenty-Four, which reduced load times to about 2 seconds.
5. Noted an issue in the custom theme's code and provided the correct usage:

echo __('my-string', 'my-textdomain');

should be

_e('my-string', 'my-textdomain');

as per WordPress standards.

If these solutions do not resolve the issue or if they seem 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 the problem persists, 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.

This topic contains 11 replies, has 2 voices.

Last updated by Andreas W. 2 weeks, 5 days ago.

Assisted by: Andreas W..

Author Posts
June 5, 2024 at 12:34 pm

georgeC-7

Background of the issue:
I'm using WPML and the String Translation plugin for my website, but the site speed is very slow, taking 10-12 seconds to respond. The server admin identified the String Translation plugin as the cause of this issue. Next step was to run a code profiling tool that confirmed that the issue comes directly from the String Translation plugin. Check the image here - hidden link. Here's what I've tried so far without any result: Implemented solutions suggested by other users in the forum - facing the same issue, but had no success. Unchecked the option to locate the position of the string in the String Translation settings. Enabled caching with LiteSpeed. Upgraded to a dedicated server with extra resources and CPU power. Created a staging website, but the problem persists there as well. When I deactivate the plugin, the website responds normally and quick. Link to a page where the issue can be seen: hidden link

Symptoms:
The site speed is very slow, taking 10-12 seconds to respond. The issue is confirmed to come from the String Translation plugin. When the plugin is deactivated, the website responds normally and quickly.

Questions:
Could you please check what's wrong with my WPML installation?

June 5, 2024 at 12:59 pm
June 5, 2024 at 11:20 pm #15709047

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I ran the WPML troubleshooting option to "Cleanup and optimize string tables" (WPML > Support > Troubleshooting) and created the custom language MO files needed for WPML, which were still missing.

Those files save the translations from String Translation and save them at /wp-content/languages/wpml.

This leads to a better performance for the site.

Now, the page load is between 5-7 seconds from which about 2 seconds are caused by the load of an mp4 video and a few GIF files and/or other image files.

At this point, I would need to take a copy of the site, for testing how much impact WPML currently has on the load time. Take note that up to 1 second caused by WPML is expected.

Do you agree if I install the plugin "All In One WP Migration" and take a package of the site for testing it on a virtual server?

June 6, 2024 at 7:11 am #15709421

georgeC-7

Hello,
Yes go ahead and take a backup.
I wanted to provide some notes regarding the issue we're facing with extra loading times caused by the WPML String Translator.

The extra loading times impacts all pages, including those without videos, many images, or extensive queries (e.g., product pages).
The LIVE site might sometimes be confusing to diagnose because I'm currently using LITESPEED, and some pages are heavily cached, which makes them load super fast. However, the underlying problem still exists, and I’m trying to mask it in order to keep our customer satisfied while waiting for a solution.
I understand that WPML can contribute to loading times, but it shouldn't be causing the site to load this slowly.
Please keep me informed if you need any further information from my side.

Thanks in advance!

Best regards,
Konstantinos

June 6, 2024 at 1:15 pm #15711229

georgeC-7

Hello,

I hope you’re doing well! I just wanted to check in to see if there have been any updates on the issue we’re facing. Also, if possible, could we please ensure that no plugins are deactivated on the website?

Thank you so much for your help!

Best regards,

June 6, 2024 at 4:16 pm #15712634

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

No worries, I will not deactivate any plugins.

I am now about to take a copy of the site for testing. Take note, that I am in a different time zone. My location is Lima, Peru.

June 7, 2024 at 6:33 am #15713742

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Kindly note that today, Friday the 7th of June is a public holiday here in Peru.

I will be back on Saturday, the 8th of June, to assist you on this matter.

June 8, 2024 at 6:49 pm #15718644

georgeC-7

Hello Andreas,

I hope you're doing well!

I just wanted to check if there are any updates on the issue we're facing. Were you able to copy the website? We're in a tight spot right now and urgently need your support to resolve this as soon as possible.

I remain at your disposal for anything you need.

Thank you for your time!

June 8, 2024 at 8:21 pm #15718667

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

It looks like in this case, we need to clean up the database:
https://wpml.org/errata/reducing-size-of-icl_translate_job-icl_translate-and-other-wpml-tables/

Could you please take a backup of your site, then install the recommended plugin and run the cleanup process?

Take note that you might need to run the process 4-5 times. As the final step also run the dialog to clean translation job statuses. If you need my assistance with this task, please let me know.

Further, I can suggest the following query, which will delete strings from WPML > String Translation that have not yet been translated.

DELETE FROM wp_icl_strings WHERE status 0;
June 10, 2024 at 1:53 pm #15722417

georgeC-7

I implemented your suggested solution by creating a copy of the website and making the recommended changes. Unfortunately, the issue persists.

I deleted approximately 200 jobs, and an additional 9,000 entries were removed via the SQL query. Despite these cleanups, the WPML tables remain excessively large. For instance, the wp_icl_translation_status table is still 85 MB.

The live site is barely usable, with noticeable improvement only when the wpml_strings plugin is deactivated.

We need your further suggestions to resolve this issue.

Thank you for your assistance.

June 11, 2024 at 1:28 pm #15726912

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Could you please allow me access to this copy of your website, so that I can take a closer look at the site?

The private reply form is enabled again.

June 11, 2024 at 1:52 pm #15727224

georgeC-7

Unfortunately this copy I took is not available anymore!
Altough, we gave you access so feel free to take a backup!

We have encountered the issue for nearly a week, and despite our efforts, we have not found a solution. Given the urgency of our situation, we kindly request your assistance in resolving this problem.

We understand that you may be experiencing a high volume of inquiries, but we would greatly appreciate it if you could prioritize our request and provide a resolution as soon as possible. Your attention to this matter is invaluable to us.

Thank you for your understanding and assistance

June 11, 2024 at 9:23 pm #15729026

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I ran the WPML Options for Troubleshooting at WPML > Support > Troubleshooting > Cleanup I went to WooCommerce > Status Tools and use the option "Create default WooCommerce pages".

Then I went to WooCommerce > WooCommerce > Multilingual & Multi-Currency > Status and click "Create missing translations".

Those steps are mandatory to run WooCommerce and to run it with WPML/WCML.

If I test your site now while using all plugins but switching to a default theme like Twenty Twenty-Four, the load time is about 2 seconds.

The issues only appear to occur if your Custom Theme is enabled. As soon I enabled your Custom theme the load time went up to more than 12 seconds.

---

Now, debugging a whole Custom Theme is something that is not covered by our support policy and we can not take responsibility for custom code.

I have taken a quick look into a few of your templates, and I was able to spot at least one issue.

For example:

echo __('my-string', 'my-textdomain');

This is not valid according to WordPress Standards.

You should be using:

_e('my-string', 'my-textdomain');

Source:
https://developer.wordpress.org/reference/functions/_e/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.