[Warten auf das Feedback der Benutzer] How to cleanup wp options from wpml
Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.
Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.
<b>Hintergrund des Themas: </b>
I am trying to clean up the wp_options table from WPML data because our hoster and performance improvement OP mentioned that WPML is adding too much data to the wp_options table.
<b>Die Symptome: </b>
No specific error messages or unexpected behavior were reported.
<b>Fragen: </b>
How can I remove the WPML auto load data from the options table?
The reset and clean uninstall process did not remove the wpml data and i can see a lot of forum users complaint about very large options table via wpml. 🙁
Before making any changes, please take a full backup of your WordPress database (via phpMyAdmin or `mysqldump`). This ensures you can restore the site if needed.
You can follow this:
1. Identify all WPML-related options by running these queries:
SELECT * FROM `wp_options` WHERE `option_name` LIKE '%wpml%';
SELECT * FROM `wp_options` WHERE `option_name` LIKE '%icl%';
This will list all entries that have been created by WPML.
2. Review the results carefully. Do not delete anything unless WPML has been fully uninstalled or you are certain the entries are no longer needed.
3. If WPML is uninstalled and you want to remove its leftover data, run the following queries:
DELETE FROM `wp_options` WHERE `option_name` LIKE '%wpml%';
DELETE FROM `wp_options` WHERE `option_name` LIKE '%icl%';
4. After deleting entries, you can optimize the table to reclaim space:
OPTIMIZE TABLE `wp_options`;
The table name wp_options may differ depending on your WordPress installation.
If your database uses a custom prefix (for example abc123_options or mysite_options), replace wp_ with your actual prefix:
The WPML Reset and delete languages tool does delete WPML settings, language configuration, and translation tables from the database. However, it does not remove every WPML-related entry, particularly some data stored in the wp_options table.
This is because WPML also stores certain options and internal references in the wp_options table to ensure a safe reinstallation and to prevent breaking other parts of WordPress. These leftover entries can accumulate over time, especially from caching mechanisms.
That’s why, even after deleting languages or performing a full reset, you may still see WPML or ICL-related data in the options table.
That being said, you can do something like:
SELECT * FROM wp_options WHERE option_name LIKE '%wpml%';
SELECT * FROM wp_options WHERE option_name LIKE '%icl%';
DELETE FROM wp_options WHERE option_name LIKE '%wpml%';
DELETE FROM wp_options WHERE option_name LIKE '%icl%';
OPTIMIZE TABLE wp_options;