Title: Duplicate mo.php files
Last modified: September 26, 2023

---

# Duplicate mo.php files

 *  Resolved [chrismask](https://wordpress.org/support/users/chrismask/)
 * (@chrismask)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/duplicate-mo-php-files/)
 * Hi,
 * After the latest update, i have issues with multiple .php files being created.
   like woocommerce-el.mo.php and woocommerce-el.mo.php.php
 * > [View post on imgur.com](https://imgur.com/a/6WPRuAv)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Pascal Birchler](https://wordpress.org/support/users/swissspidy/)
 * (@swissspidy)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/duplicate-mo-php-files/#post-17079116)
 * Thanks for flagging! In the new version, `woocommerce-el.mo.php` is the correct
   file extension. No idea how `.mo.php.php` could happen, that’s definitely wrong.
   At first glance I cannot reproduce it, but I’ll check it out more closely!
 * I see you have some backup PO file there as well. Are you using some other multilingual-
   related plugins on your site?
 *  Thread Starter [chrismask](https://wordpress.org/support/users/chrismask/)
 * (@chrismask)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/duplicate-mo-php-files/#post-17080737)
 * > [View post on imgur.com](https://imgur.com/3mSdqWy)
 * Okay, i use loco translate on custom and default folder inside /language/ but,
   even though i have set auto_update_translation to false, in order not to download
   default plugins translations, so i use only on custom, they are downloaded and
   put on /plugins/, apart from /loco/plugins/ (which i have my default translations.
   I think when this download happens, your plugin detects both, and adds another
   php file, so it duplicated mo.php adding .php in the end, thus the mo.php.php
   file. I also have found that BOTH are run from your plugin, which makes it slower.
   For example when I have woocommerce plugin po both inside /plugins/ and /loco/
   plugins/ and it makes the performant translations why slower.
 * At last, I have some concerns about the secury of these approaches, since the
   po files which are downloaded automatically (and cant be stopped) are instanlty
   converted to .php and run on each page load, which could have implications. What
   are your plans to make this approach as secure as possible?
 *  Plugin Author [Pascal Birchler](https://wordpress.org/support/users/swissspidy/)
 * (@swissspidy)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/duplicate-mo-php-files/#post-17080965)
 * Thanks for the additional context! I see now that Loco Translate has some interesting
   logic. We’ll fix this in 1.0.5!
 * > I also have found that BOTH are run from your plugin, which makes it slower.
 * Just having two files generated does not make them slower. Only one of them will
   be loaded. You can safely delete one if you’d like, but it also doesn’t hurt 
   anything.
 * > At last, I have some concerns about the secury of these approaches, since the
   > po files which are downloaded automatically (and cant be stopped) are instantly
   > converted to .php and run on each page load, which could have implications.
   > What are your plans to make this approach as secure as possible?
 * There’s not really a security implication with this automatic generation. Any
   translation files are already trusted by WordPress, and the file conversion is
   just a convenience. Also, once we merge this into WordPress core, you’ll get 
   the PHP files directly from translate.wordpress.org, mostly removing the need
   for the whole file conversion. That said, you can also completely disable the
   file conversion or PHP file usage in general using the provided filters.
 *  Thread Starter [chrismask](https://wordpress.org/support/users/chrismask/)
 * (@chrismask)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/duplicate-mo-php-files/#post-17081597)
 * Thank you, very good job.
 * But, Loco plugin indeed runs the php two times i have done many tests that can
   confirm it. For example if i have woocommerce po both on languages/loco/plugins(
   custom) and language/plugins (system), its significantly slower (0.1s), while
   immediatelly when i delete one of these it gets to 0.06s. I have done hundreds
   of these benchmarking, and the time is very consistent according to the php file
   size. I havent customize the load plugin testdomain filter, this is the default
   behavior from Performant tranlsations combined with loco translate.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Duplicate mo.php files’ is closed to new replies.

 * ![](https://ps.w.org/performant-translations/assets/icon.svg?rev=3098168)
 * [Performant Translations](https://wordpress.org/plugins/performant-translations/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/performant-translations/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/performant-translations/)
 * [Active Topics](https://wordpress.org/support/plugin/performant-translations/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/performant-translations/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/performant-translations/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [chrismask](https://wordpress.org/support/users/chrismask/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/duplicate-mo-php-files/#post-17081597)
 * Status: resolved