Back to Community

Why Your Logs Are Filled With Loco Translate Debug Messages (And How to Fix It)

22 threads Sep 16, 2025 PluginLoco translate

Content

If you've recently updated Loco Translate and suddenly found your server logs flooded with messages like [Loco.debug] "Unloaded premature text domain...", you're not alone. This is a common occurrence after version 2.7 and can be confusing. This guide will explain what these messages mean and the steps you can take to manage them.

What Are These Debug Messages?

Starting with version 2.7, Loco Translate introduced enhanced debugging to help identify a common WordPress issue: the premature loading of text domains. A text domain is what WordPress uses to load translated strings for a plugin or theme.

When a plugin or theme attempts to load its translations too early in the WordPress process, it can cause instability. Loco Translate now detects this and "unloads" the premature text domain so it can be loaded correctly later. The debug message is simply a log of this action, informing you which plugin or theme (e.g., finale-woocommerce-deal-pages, wp-cerber) was involved.

Important: These are debugging notices, not errors. Your site should function normally. The primary issue is that they can fill up log files, making it harder to spot genuine problems.

How to Resolve the Flood of Debug Messages

There are a few different approaches to handling this, depending on your needs and technical comfort level.

Solution 1: Disable WP_DEBUG (The Simplest Fix)

The most straightforward solution is to disable WordPress debugging. These messages are designed specifically for developers and should not be enabled on a live production site.

In your site's wp-config.php file, locate the following line and ensure it is set to false:

define( 'WP_DEBUG', false );

This will stop all debug messages, including those from Loco Translate, from being written to your logs.

Solution 2: Use a Filter to Disable Only Loco Debugging

If you need to keep WP_DEBUG enabled for other reasons but want to silence Loco Translate's messages, you can use a WordPress filter. The key is to ensure the filter is registered early enough in the loading process.

Add the following code to your theme's functions.php file or in a custom site-specific plugin:

add_filter( 'loco_debug', '__return_false' );

If the above doesn't work, the filter may not be registered in time. Try using a higher priority (a lower number) to ensure it runs sooner:

// Add this to your theme's functions.php or a custom plugin
add_filter( 'loco_debug', '__return_false', 1, 1 );

Solution 3: Disable the Unload Feature Entirely

If you would prefer that Loco Translate does not attempt to unload premature text domains at all, you can disable the feature completely with another filter.

// Add this to your theme's functions.php or a custom plugin
add_filter( 'loco_unload_early_textdomain', '__return_false' );

This will stop the feature that generates the messages in the first place.

Solution 4: Address the Root Cause

The debug messages are actually trying to tell you something useful. Each message names a specific plugin or theme that is loading its translations incorrectly. For a permanent fix, you should contact the author of the plugin named in the log message (like "finale-woocommerce-deal-pages" or "disable-dashboard-for-woocommerce") and point them to the message. They should ensure their code loads translations on the init action or later, which is the WordPress best practice.

Conclusion

A flood of [Loco.debug] messages is a known change in behavior for the plugin starting with version 2.7. While the messages themselves are harmless, they can be a nuisance. You can easily manage them by disabling general debug mode, using provided filters to silence Loco Translate specifically, or by addressing the underlying issue in the plugins named in the logs.

Related Support Threads Support