WordPress powers websites around the world, and its multilingual capabilities rely heavily on a system of language files that make theme and plugin translation possible. If you want to build a multilingual website, contribute translations, or create translation-ready WordPress themes and plugins, understanding these files is essential.
This guide breaks down what .po, .mo, and .pot files are, how they work, and how to use them effectively in a multilingual WordPress environment.
What Are WordPress Language Files?
WordPress uses localized text files to store, manage, and load translations. These files work with the WordPress internationalization framework and gettext system to display text in different languages.
There are three main types of translation files:
.pot— Portable Object Template.po— Portable Object (editable translation file).mo— Machine Object (compiled file used by WordPress)
Each plays a different role in the translation process.
What Is a .POT File?
File type: Template
Purpose: Provides the base list of text strings to translate
Editable: Yes
A .pot file is a template file that contains all translatable text strings extracted from a theme or plugin. It does not contain translations — only the original text that needs to be translated.
Developers generate .pot files so translators can create language-specific .po files from them.
Example file name:
plugin-name.pot
Inside a .pot file:
msgid "Read more"
msgstr ""
.pot files are the foundation of all translations.
What Is a .PO File?
File type: Translation source
Purpose: Stores original text and translated text
Editable: Yes
A .po file contains both the original text and the translated version for a specific language. Translators work directly in .po files.
Example file names:
plugin-name-en.po (English)
plugin-name-es.po (Spanish)
plugin-name-fr_FR.po (French - France)
Inside a .po file:
msgid "Read more"
msgstr "Leer más"
The .po file is where you or your translation tool enters translations manually.
What Is a .MO File?
File type: Compiled binary
Purpose: Used by WordPress to display translations
Editable: No
A .mo file is a machine-compiled version of a .po file. After you create or edit a .po file, it must be compiled into a .mo file so WordPress can read it efficiently.
Example file names:
plugin-name-es.mo
plugin-name-de_DE.mo
WordPress does not read .po files directly — it reads .mo files.
How These Files Work Together
| File Type | Contains | Editable | Purpose |
|---|---|---|---|
.pot | Translatable strings only | Yes | Template file for translators |
.po | Original + translated text | Yes | Working file for translations |
.mo | Compiled translation data | No | File WordPress uses to display translations |
Flow of the translation process:
.pot file → .po file → .mo file
Where WordPress Stores Language Files
Core WordPress files
/wp-content/languages/
Themes
/wp-content/themes/theme-name/languages/
Plugins
/wp-content/plugins/plugin-name/languages/
Many plugins also store authorized translations in /wp-content/languages/plugins/.
Tools to Edit .PO and Generate .MO Files
You can edit .po files and generate .mo files using translation tools such as:
- Poedit
- Loco Translate (WordPress plugin)
- WP-CLI i18n tools
- GlotPress (used by WordPress.org)
- PHP gettext utilities
Most beginners use Poedit or Loco Translate for convenience.
Example Workflow: Translating WordPress Strings
- Install a translation-ready theme or plugin
- Locate the
.potfile - Create a
.pofile with your language (e.g., Spanish) - Translate strings in the
.pofile - Generate the
.mofile - Upload both
.poand.moto the correct folder - Set your WordPress language in Settings
WordPress will automatically load translations based on your site language.
Tips for Developers Creating Translation-Ready Themes & Plugins
- Use WordPress gettext functions (
__(),_e(),_x(), etc.) - Include a
.potfile in your theme or plugin - Use consistent text domains
- Run tools like
wp i18n make-potto extract strings - Follow WordPress internationalization standards
Proper internationalization ensures your themes and plugins can be translated without modifying code.
Final Thoughts
Understanding .po, .mo, and .pot files is fundamental for building and managing multilingual WordPress websites. Whether you’re translating a site or developing translation-ready themes and plugins, these file formats enable WordPress to deliver accurate and efficient multilingual experiences.
A multilingual strategy isn’t just about translation plugins — it’s about mastering the underlying language architecture that powers WordPress.
Frequently Asked Questions
Do I need all three files?
You need .pot to create .po, and .po to generate .mo. Users only need .po and .mo files.
Can I translate WordPress without coding?
Yes. Use tools like Loco Translate or a plugin like WPML or Polylang.
Why does my translation not show up?
Common causes: missing .mo file, wrong file location, incorrect text domain, or outdated cache.
Is machine translation enough?
It can help start the process, but human review ensures accuracy and tone.