Back to Community

How to Manage and Clean Up TranslatePress Database Tables

Content

Many users of the 'Translate Multilingual sites – TranslatePress' plugin encounter issues with their database tables growing in size or containing unwanted data. This guide explains why this happens and provides common solutions for managing these tables safely.

Why TranslatePress Creates Database Tables

The plugin stores all translation data in dedicated database tables to provide fast access to translated content. The main tables you'll encounter are:

  • wp_trp_original_strings: Stores the original text content
  • wp_trp_dictionary_*: Contains translations for each language pair
  • wp_trp_gettext_*: Stores translations for dynamic text (gettext strings)
  • wp_trp_original_meta: Contains metadata about the original strings

Common Issues and Solutions

1. Unwanted Strings in Translation Tables

TranslatePress automatically detects and stores all text content from your site, which can include user-generated content, spam search terms, or even URLs.

Solution: You can exclude specific elements from translation to prevent them from being added to the database. This is done by adding CSS selectors to the exclusion list in the plugin's Advanced settings.

2. Large Database Tables

The translation tables can grow significantly over time, especially on active sites.

Solution: You can safely delete untranslated strings from the dictionary tables. Before doing this, always create a database backup. The plugin will regenerate necessary strings when pages are visited again.

3. Orphaned Database Entries

Even after uninstalling the plugin, some database entries might remain.

Solution: Entries like 'translatepress_avg_affiliate_id' in the wp_options table can be safely deleted if you're not using the plugin. Always backup your database before making changes.

4. Translation Data Reappearing

Some users report that deleted translations reappear over time.

Solution: This typically happens when the original content changes slightly, creating a new string that needs translation. The plugin doesn't overwrite existing manual translations unless the original string changes.

5. Database Update Loops

During plugin updates, you might encounter endless loops like "Removing duplicated dictionary strings for language..."

Solution: This is often caused by incomplete previous updates or corrupted tables. The TranslatePress team suggests dropping tables with date stamps at the end of their names and then saving the General settings to regenerate proper tables.

Important Precautions

Before making any changes to your database:

  1. Always create a complete database backup
  2. Test changes on a staging site first
  3. Be cautious when deleting data from tables directly
  4. Understand that some strings will be regenerated when pages are visited

While direct database manipulation is possible for advanced users, most translation management should be done through the plugin's Translation Editor interface to avoid unexpected behavior.