Solved: wp_icl_string_pages huge table in database, hundreds of MB, WPML to blame

I discovered a huge table in a customer WordPress when performing a backup with Duplicator before starting to update the site and plugins.

Database was huge and boasted a hundred-thousand-row table named prefix_+ icl_string_pages. What the heck and phuck?

scl_string_tables over a million rows
icl_string_tables over a million rows, database report in Duplicator before creating a package

So but it seems that it was not a new topic. Many have already faced this issue before and I recall, I have myself, too.

Still, worth to write it down for anyone struggling with the same finding. It turns out this is nothing more than just a cache table for WPML WordPress multilingual translation plugin.

How to solve icl_string_pages many rows issue?

  1. Backup site (so that it’s recoverable in case something breaks after applying the following changes)
  2. Go to WPML -> Support -> Troubleshooting (troubleshooting is not a menu item, just find for the linked text in the Support page)
  3. Hit Recreate ST DB Cache tables or Cleanup and optimize string tables (depends on the version of your WPML)
WMPL Recreate ST DB Tables
WPML Recreate ST DB Cache Tables will clear icl_string_pages huge size to nearly zero

This has proven to be the correct solution to reduce the size of _icl_string_pages table size.

The end result might differ for you, but you should see significant decrease in database size.

Duplicator database analyze WPML cache tables reduced size
Duplicator database analyzer showing WPML cache tables reduced size

 

More reading on topic

  • Here is a relevant link to WPML’s own support thread:
    https://wpml.org/forums/topic/database-table-icl_string_pages-too-big/
  • WPML have announced that they will completely solve this issue starting from version 4.3.0 by starting to benefit from .mo files and reduce strings in databases. You can read that announcement here:
    https://wpml.org/changelog/2019/10/wpml-4-3-with-revamped-string-translation/#comment-2690623

Post Author: Tom Pai