Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is using WPML with the 'different domains per language' setup and faces issues when trying to edit English-language pages using Elementor on a separate domain. The client gets logged out or redirected to the login screen because the 'wordpress_logged_in_' cookie is not present on the English domain.
Solution:
We recommend checking the WPML > Languages settings in your WordPress admin. Ensure that the 'Auto sign-in and sign-out users from all domains' option is enabled. This setting helps maintain user sessions across different domains. Additionally, consider adding the following code to your wp-config.php file if it's missing:

if (isset($_SERVER['HTTP_HOST'])) {<br />define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);<br />define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);<br />}

This code dynamically sets your WordPress and Site URL based on the domain being accessed, which can help in maintaining sessions across multiple domains.

If these steps do not resolve your issue, or if the solution seems outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, 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.

This topic contains 6 replies, has 1 voice.

Last updated by tuncayO-2 2 months, 1 week ago.

Assisted by: Christopher Amirian.

Author Posts
April 16, 2025 at 11:00 pm #16941425

tuncayO-2

Background of the issue:
I'm using WPML with the 'different domains per language' setup: Romanian (default): hidden link, English: hidden link. I'm able to log in and edit Romanian pages from the .com.ro admin panel. But when I try to edit an English-language page using Elementor, WordPress logs me out or redirects me to the login screen. I've inspected browser cookies and confirmed: The wordpress_logged_in_ cookie exists for .com.ro but it's not present on .co.uk.

Symptoms:
When I try to edit an English-language page using Elementor, WordPress logs me out or redirects me to the login screen. When I login, the Elementor loading page appears but does not load.

Questions:
Is there a built-in way in WPML to support session sharing across these domains?
Is there a recommended method to keep users authenticated when switching between language versions during content editing?

April 17, 2025 at 8:27 am #16942673

tuncayO-2

I’ve now confirmed the same session/logout issue happens on another website (canasity.ro / canasity.es) using WPML’s “different domain per language” setup.
This seems like a broader compatibility issue with Elementor + WPML + cross-domain sessions. Can you please confirm if WPML has a recommended solution for login/session handling across TLDs?

April 17, 2025 at 12:22 pm #16943831

tuncayO-2

Hi, just following up — this issue is blocking us from using WPML in a standard setup. Can someone from the team please assist as soon as possible? We’ve confirmed it’s not resolved server-side.

April 20, 2025 at 7:04 am #16949461

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support. Sorry for our late reply due to the high queue. The reply times will be longer than usual.

Would you please go to WPML > Languages and under the separate domain options make sure that the "Auto sign-in and sign-out users from all domains" option is enabled?

Also try the lower options both the POST and GET one and tell me if it fixes the issue?

Thanks.

Screenshot 2025-04-20 at 11.02.26 AM.png
April 21, 2025 at 9:59 am #16951464

tuncayO-2

Hello

I tried both option but still it is the same problem.

April 21, 2025 at 10:12 am #16951504

tuncayO-2

Rocket.net wrote me this

"It's unlikely related to the hosting, here is the CURL output from medicinepark.com.uk that comes with x-redirect-by: WordPress header. So, looks like any plugin or wordpress itself is redirecting it. I would recommend sharing this with WPML as well.
HTTP/2 301
date: Mon, 21 Apr 2025 08:45:14 GMT
content-type: text/html; charset=iso-8859-1
location: hidden link
cache-control: public, max-age=0, s-maxage=2592000
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 933b9aa57a173727-FRA
alt-svc: h3=":443"; ma=86400

HTTP/2 302
date: Mon, 21 Apr 2025 08:45:17 GMT
content-type: text/html; charset=UTF-8
location: hidden link
x-redirect-by: WordPress
cache-control: public, max-age=0, s-maxage=2592000
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 933b9aa5bab33727-FRA
alt-svc: h3=":443"; ma=86400

April 21, 2025 at 2:45 pm #16952039

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the information. I can take a look at that and see if I can find any cues. Is it ok if I add a sample page for testing there?

I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Thanks.

April 21, 2025 at 5:00 pm #16952486

tuncayO-2

Hello

I found the problem;

I compared the wp-config of the another site. The one which was doing problem had missing part as:
if ( isset( $_SERVER['HTTP_HOST'] ) ) {
define( 'WP_HOME', 'hidden link' . $_SERVER['HTTP_HOST'] );
define( 'WP_SITEURL', 'hidden link' . $_SERVER['HTTP_HOST'] );
}

I added and it is resolved.

Thank you