After an in-depth performance analysis earlier this year revealed that translations can impact server response times, WordPress contributors proposed half a dozen technical solutions for consideration to improve performance for the ~56% of sites that use translations.
Performant Translations, a feature project by the core Performance Team, is now available as a plugin on WordPress.org. It incorporates some of the proposed solutions and speeds up translations by converting .mo
files to .php
files, allowing them to be parsed faster and stored in OPcache.
It supports multiple file formats (.mo
, .php
, and .json
) and multiple text domains and locales loaded at the same time. Existing .mo
files get converted to .php
files which are then loaded by WordPress.
A chart included on the plugin’s details page shows a significant page load time reduction when using the plugin, as compared to sites with translations that don’t use the plugin. The plugin brings translations very close to the same page load times as English (non-translated) sites.
“With enough testing and feedback, we hope to eventually merge this plugin into WordPress core,” Performance Team contributor Pascal Birchler said when announcing the plugin on X.
“In the coming weeks and months we will share more testing instructions and continue to improve the plugin. This will be made available via Performance Lab, too.”
Users who are testing the plugin can report issues on the support forum or create an issue on the GitHub repository.
Performant Translations is considered to be a beta testing plugin but can be tested and used in production at your own risk. It doesn’t require any changes to settings or configuration after installation. The plugin can be safely removed after testing, because it essentially cleans up after itself. All .php
files it generates will be removed by the server once the plugin is deactivated and uninstalled.