Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 6 replies, has 0 voices.

Last updated by Dražen 2 days, 12 hours ago.

Assisted by: Dražen.

Author Posts
July 23, 2025 at 9:03 am #17262751

T4ng

Background of the issue:
From WPML > Support > Troubleshooting > Check from string issues, I get over 25000 strings

Which means I have over 25000 strings that are "not used or linked to the wrong translation data"
I understand I should get rid of them.

I also know I could adjust my server settings to allow longer/bigger requests. But let's face it: it's an edge case, and I won't make this setting adjustment for this request only, considering it will cause other issues (security, ...).

Symptoms:
Removing it through the interface doesn't work : I won't go through 265 pages of 100 results and click delete.
Alternatively, I know I can display all the results and tick them all and remove them all at once.
Unfortunately, the request will fail since it's way, way too long to process.

Questions:
Should I really get rid of these values, and if so, how can I do it efficiently? There must be a way. Thanks

July 23, 2025 at 9:18 am #17262915

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I have escalated this case to our 2nd tier to advise and check further.

I will update when I have some news, note it may take a day or two.

Regards,
Drazen

July 29, 2025 at 8:43 am #17277687

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

we have checked, please try next:

It requires reloading back-end pages with an added url parameter to trigger the code a few times. It will delete strings 5000 at a time.

So, the steps are

- Take a backup
- Make sure you have taken a backup.
- Add the attached plugin file to the plugins/ folder and activate the plugin.
- Visit the site dashboard, then append ?delete_strings=1 to the URL and reload.
- You should get a message saying that x number of strings have been deleted.
- Refresh the page as many times as needed until it says there are no strings to delete.
- Go to the troubleshooting page and click the button to check from string issues again, which should now show 0 strings needing deletion. (This code uses the same query as on that page.)
- Also from troubleshooting, run the "Cleanup and Optimize String Tables" step.
- Deactivate and remove the plugin.

Link to plugin: hidden link

Please get back to us and let us know if this works.

Regards,
Drazen

July 29, 2025 at 9:28 am #17277881

T4ng

Hi,

I will try that.

However, can you be more explicit.

- Is it necessary, or advised to get rid of these values?
- Are these all outdated, or wrong?
- What may I miss after removing them?
- Should I expect performance improvements after deletion, better stability, ...?

July 29, 2025 at 9:48 am #17278072

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

1) It is not necessary, it is only advised if you wish to do a clean up of unused / not translated strings.

2) No they are not, most of them are not used / translated so you can remove them if you do not wish to translate them. Other might be strings that do not anymore exist in source file, but are still showing in String translation.

3) You should not miss anything, as said there are either not translated or not existing strings or modified from source files and etc.

4) Some small improvements in performance may happen, since some data will be removed, so you can expect a bit lower DB table, which can give slight increase in load time, but probably not that much significant.

Hope this helps.

Regards,
Drazen

July 29, 2025 at 11:05 am #17278458

T4ng

Ok, it seems to do the job. I could see it reduced, at each attempt, the remaining amount of values to clear.

Thank you.

If these values are always useless, for all users, whatever the setup, why not adding this script to WPML and run it as a daily cron? It would prevent this list from growing so much.

July 29, 2025 at 11:14 am #17278501

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks and glad to hear it helps.

The script is just a quick workaround fix for your case, not something for general usage, a better solution and implementation from our side would probably be needed, issue is going to be escalated to developer and they will be working on proper fix / solution.

Regards,
Drazen