Understanding WordPress Language Files: .po, .mo, .pot Explained

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 TypeContainsEditablePurpose
.potTranslatable strings onlyYesTemplate file for translators
.poOriginal + translated textYesWorking file for translations
.moCompiled translation dataNoFile 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

  1. Install a translation-ready theme or plugin
  2. Locate the .pot file
  3. Create a .po file with your language (e.g., Spanish)
  4. Translate strings in the .po file
  5. Generate the .mo file
  6. Upload both .po and .mo to the correct folder
  7. 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 .pot file in your theme or plugin
  • Use consistent text domains
  • Run tools like wp i18n make-pot to 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.

Recommended Multilingual Wordpress Plugins

Feature / Plugin

- Monthly
  • Translation Method
  • Number of Languages
  • Ease of Use
  • SEO Support
  • WooCommerce Support
  • Automatic Translation
  • String Translation
  • Performance Impact
  • Free Version Available
  • Our Suggestion

WPML

39 Year
  • Manual and automatic
  • Unlimited
  • Moderate
  • Yes
  • Yes
  • Yes (integrated with services)
  • Yes
  • Moderate
  • No
  • Recommended for Content Websites

Weglot

99 Year
  • Automatic (with manual editing)
  • Varies according to plan
  • Easy
  • Yes
  • Yes
  • Yes (high quality)
  • Yes
  • Low
  • Yes
  • Recommended for E-commerce Websites

Translatepress

$ 79 Year
  • Manual and automatic
  • Unlimited
  • Easy
  • Yes
  • Yes (premium)
  • Yes (integrated with services)
  • Yes
  • Low
  • Yes
  • Recommended for Small Websites

Polylang

99 Year
  • Manual
  • Unlimited
  • Moderate
  • Yes
  • Yes
  • Yes (integrated with services)
  • Yes (premium)
  • Low
  • Yes
  • Recommended for Low Budget Websites