[Resolved] Translations on my subdomains no longer work
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with translations not working on subdomains of their multilingual site. The symptoms include blank pages or '500 error' messages when accessing these subdomains. Solution: We recommend enabling debugging to identify the root cause of the issue. Here are the steps to follow: 1. Open the
wp-config.php
file. 2. Find the line
define('WP_DEBUG', false);
and change it to:
define('WP_DEBUG', true);
3. Add another line to enable error logging:
define('WP_DEBUG_LOG', true);
This will save the errors to a
debug.log
file in the
/wp-content/
directory. Check this log for any specific errors. Additionally, ensure that the Site URL and Home URL settings are correctly configured in the WPML settings. The Home URL should be set to the primary domain (e.g., https://www.site.com), and the subdomain (e.g., https://en.site.com) should be set as the secondary domain. For more detailed instructions on debugging WPML, visit WPML Debugging Documentation.
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am trying to manage translations on my site, which has two languages: English and Italian. I attempted to access these translations via sub-domains, but encountered issues. The problem can be seen at this link: hidden link
Symptoms:
Translations on my subdomains no longer work. When I go to these sub-domains, nothing works.
Questions:
Why are translations on my subdomains not working?
How can I fix the issue with my sub-domain translations?
While one of my teammates handles your ticket, I will provide you with initial debugging steps.
You might have a fatal error. The blank page means that there is an error in the PHP code that your site runs. When errors are not caught, the server stops everything and returns a page that says “500 error” or an empty page. Different servers are configured to display these errors slightly differently, but they all mean the same – there is an unhandled PHP error in the site’s code.
First, you need to see what the errors are. Guessing what might be the problem and trying different solutions may lead to even more trouble. The first step is to enable debugging. You can add a few lines to the site’s wp-config.php file. With the error log enabled, you will see the actual problem.
To enable it, open your wp-config.php file and look for define('WP_DEBUG', false);. Change it to:
define('WP_DEBUG', true);
To enable the error logging to a file on the server, you need to add yet one more similar line:
define( 'WP_DEBUG_LOG', true );
The errors will be saved to a debug.log file inside the /wp-content/directory.
Is there anything in the debug.log? If there is an error, it can be found at /wp-content/debug.log.
I also noticed that the Site URL is hidden link and the Home URL is hidden link. I suggest you change the Home URL to hidden link and leave hidden link as the secondary domain in WPML settings.
There is nothing in the debug log, sir.
And the home page URL is indeed hidden link in French. In English, it is hidden link.
Shall I send you the login details for the website?
New threads created by Andrey and linked to this one are listed below:
I need to request temporary access (wp-admin and FTP) to your site—preferably to a test site where the problem has been replicated if possible—in order to be of better help. When you log in to leave your next reply, you will find the needed fields below the comment area. The information you will enter is private, meaning only you and I can see and access it.