Hello @caritatang
The error message you’re encountering is related to a translation issue in the Astra theme (or potentially a plugin) on your WordPress site. The error is caused by the _load_textdomain_just_in_time function being triggered too early during the page load, which is causing issues with the WordPress headers and the login page. This type of issue often arises after a WordPress or plugin update.
Here’s how you can resolve the issue:
1. Temporarily Disable All Plugins and Themes (via FTP or File Manager)
Since you can’t access the WordPress login page due to this error, you’ll need to disable your plugins and/or theme temporarily. The most common cause of this issue is a conflict with a plugin or theme (in your case, likely the Astra theme, but it could also be a plugin). Here’s how to do that:A. Disable Plugins
- Access your website files:
- Use FTP or File Manager (via cPanel or your hosting provider) to access the WordPress files.
- Navigate to the
wp-content
folder:
- Go to
wp-content
> plugins
.
- Rename the
plugins
folder to something like plugins_old
. This will deactivate all plugins on your site.
- Try to access your login page:
- After renaming the folder, try to access the WordPress login page again (
yourdomain.com/wp-login.php
). If you’re able to log in, the issue is most likely with one of your plugins.
- Reactivate plugins one by one:
- Rename the
plugins_old
folder back to plugins
and go into the folder. Then, rename each plugin folder back to its original name one at a time and check your site after each reactivation. This will help you identify which plugin is causing the issue.
B. Disable the Astra Theme
If the problem persists after deactivating plugins, it could be related to the theme. To test this, you can deactivate your current theme (Astra in your case) by following these steps:
- Access the
wp-content/themes
folder.
- Rename the Astra theme folder to something like
astra_old
.
- WordPress will now default to the default theme (usually Twenty Twenty-One or similar). Try logging in again.
If the issue is resolved after renaming the theme, the problem is with the Astra theme, which might need an update or fix.
2. Manually Fix the Translation Issue in the Astra Theme
The error suggests that the translation for the Astra theme is being loaded too early. You can try fixing this by adding a small fix to the theme’s functions file, but only do this if you’re comfortable with PHP.
- Access the theme’s
functions.php
file:
- Go to
wp-content/themes/your-active-theme/functions.php
.
- Look for any translation-related code:
- Check if there’s any code related to loading translations for the Astra theme. It might look like this:
load_theme_textdomain('astra', get_template_directory() . '/languages');
Change the code to load translations at the correct time:
- The translation should be loaded during the
init
action. If the code isn’t already wrapped in the init
action hook, you can modify it like this:
add_action('init', function() {
load_theme_textdomain('astra', get_template_directory() . '/languages');
});
Save the file and check your site again.