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:
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.
100% of people find this useful.
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'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?
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?
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.
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?
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.
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.
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.
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.
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.