<b>Background of the issue: </b>
I discovered that the table "wp_icl_strings" from Gravity Forms Multilingual has an absolutely enormous size, about 12.4 MB. The site I need help with is [private].
<b>Symptoms: </b>
The table "wp_icl_strings" from Gravity Forms Multilingual is about 12.4 MB, which is an absolute performance killer.
<b>Questions: </b>
Why is the "wp_icl_strings" table so large?
How can I reduce the size of the "wp_icl_strings" table?
Hi There,
Thanks for reaching out to WPML Support.
Before this thread gets assigned to my colleague, I'd like to offer some initial guidance or potential solutions.
I understand the issue. Gravity Forms Multilingual might be registering numerous form fields, notifications, and other elements as strings, which could be causing the size of the `icl_strings` table to increase. To reduce the size of the `wp_icl_strings` table, please try the following steps:
- Go to WPML > Support > Troubleshooting and scroll down to click on 'Cleanup and optimize string tables'.
- Once the process is completed, click on "Clear invalid strings". A page containing the strings that are not used or are linked to incorrect translation data will be loaded. Select the unwanted strings and delete them.
- You can also go to "WPML > String Translation" and delete the strings that you don't need. You can also remove strings by domain by following this guide: https://wpml.org/documentation/getting-started-guide/string-translation/#deleting-strings
I hope the information above will help, But, feel free to reach us if you need further assistance. We will be happy to help.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hey there,
Thank you for testing the procedure above. I'm afraid I'll need to take a closer look at the database to understand what caused this size.
In order for us to take a closer look at this issue, I'd like your help creating a package of your website and sending it to us.
Please use the plugin Duplicator(hidden link) to create a full copy of your website so we can take a look at it and see what's causing the issues with the table's size.
If you come across problems while creating it, please feel free to ignore(exclude from the backup) both uploads and cache folders.
I'm enabling the proper field for your to share this copy, you'll see it on your next response.
Alternatively, you may use any file sharing service that you prefer and share the link in the ticket(your next response is being marked as private, only you and I have access to it).
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello,
I analyzed your database and I didn't find anything unusual, it seems to be a health database, specifically when it comes to WPML.
After reviewing and optimizing the wp_icl_strings table, here's what we found:
Optimization Steps Taken:
- I ran the following query to delete untranslated strings:
DELETE FROM `wp_icl_strings` WHERE status = 0;
After deleting the untranslated strings I also needed to optimize the table, I used the WPML troubleshooting tools to clean up and optimize the string tables:
- Went to WPML > Support > Troubleshooting.
- Clicked on "Cleanup and optimize string tables".
- Clicked on "Clear invalid strings".
I also noticed that over 7,600 strings are part of the default domain, which is used across by the WordPress itself and other plugins/themes. Part of these strings are automatically downloaded when a new language is added into the site. So for example, you had translations added for those strings for both languages: Dutch and French when those languages were added to the site.
The wp_icl_strings table stores a wide range of strings, including those from pages and posts(in the format of packages), plugins, themes, and even the WordPress UI itself. This explains the size of the table. Given this content a size of 10 MB is reasonable.