Polylang Database Cleanup Issue
If you are using the Polylang plugin, you may encounter an issue after performing a database cleanup. On websites where Polylang is installed, the language relationships between categories can be removed during the cleanup process. As a result, category translations become disconnected, and various multilingual elements on the website may stop working or disappear.
This issue is caused by database optimization tools that remove entries they consider unnecessary. Specifically, cleaning up Orphaned Term Relationship and Orphaned Term Meta records can delete data that Polylang relies on to maintain language associations between taxonomy terms.
Solution
To prevent this problem, make sure the following cleanup options are disabled before running a database cleanup:
- Orphaned Term Relationship
- Orphaned Term Meta
Leaving these options unchecked preserves the taxonomy relationships and metadata that Polylang uses to connect translated categories. After disabling these cleanup options, you can safely optimize your database without breaking category-language associations.