Skip Navigation

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 2 replies, has 1 voice.

Last updated by vincentP-19 7 hours, 11 minutes ago.

Author Posts
February 8, 2025 at 9:15 pm #16683195

vincentP-19

Background of the issue:
We have a multisite install and are running a loop to clean up each subsite's WPML tables. The process involves deleting untranslated strings and optimizing the affected tables using the following queries:
DELETE FROM `wpif_{$site_id}icl_strings` WHERE `status` 10;
DELETE FROM `wpif_{$site_id}icl_string_translations` WHERE `status` 10;
TRUNCATE TABLE wpif_{$site_id}icl_string_pages;
TRUNCATE TABLE wpif_{$site_id}icl_string_urls;
OPTIMIZE TABLE `wpif_{$site_id}icl_strings`;
OPTIMIZE TABLE `wpif_{$site_id}icl_string_translations`.

Symptoms:

Questions:
Please validate that we understood right; this will delete any incomplete translations and to refill the tables (if need be), we can go ahead and scan the theme/plugins.
Are there other tables that should be emptied to further clean the database considering we have a high volume of subsites?

February 10, 2025 at 2:34 pm #16688057

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Welcome to the WPML support forum. Before passing this thread to my colleague, I would like to share some suggestions and possible solutions for the issues you mentioned.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

Instead of deleting the tables directly from the database (which is not officially recommended ), the best option to clear the WPML data (including the translations) will be WPML Reset or WPML Troubleshooting. Because it is connected with multiple tables and may result in fatal errors - https://wpml.org/documentation/support/wpml-tables/

Refer to the following documentation for more details.

https://wpml.org/documentation/support/wpml-troubleshooting-options/

https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/#step-3-do-the-wpml-reset

https://wpml.org/forums/topic/cancel-all-translation-jobs/#post-13887567

https://wpml.org/faq/translation-status-stuck-or-displaying-the-error-wpml-didnt-manage-to-translate-this-page/

https://wpml.org/documentation/getting-started-guide/string-translation/#how-to-delete-a-string

Please take a full site backup {mandatory} if you are resetting. Because once reset it will not be possible to recover.

--
Thanks!

Bigul

February 10, 2025 at 2:39 pm #16688070

vincentP-19

Thank you for the suggestions. Sadly, reseting seems to remove everything while we only want to remove untranslated/unused data in our large-scale installation.

Ideally, we need a suggestion that can be done programmatically since this would need to be done on 300+ sites. (it's a multisite)

Thank you for your assistance!