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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Bruno Kos 6 months ago.

Assigned support staff: Bruno Kos.

Author Posts
April 10, 2019 at 3:12 pm #3577825

add

I am struggeling to configure WPML to utilise root domains for different languages.
hidden link for en_gb. This is the 'master' site
hidden link for international English
hidden link for German
&
hidden link for Swedish.

I started to point all different domains to the same IP. Next I configured my NGIX server via Vesta CP . In the main domains (www.mobilewins.co.uk) config i defined the domain aliases:
mobilewins.com
hidden link
mobilewins.de
hidden link
mobilewins.se
hidden link

I edited the wp-config to contain:
$host = $_SERVER['HTTP_HOST'];
$host = in_array($host, ['www.mobilewins.co.uk', 'www.mobilewins.com','www.mobilewins.de','www.mobilewins.se']) ? $host : 'www.mobilewins.com';
define( 'WP_SITEURL', 'hidden link' . $host );
define( 'WP_HOME', 'hidden link' . $host );

Last but not least I turned the WPML settings to domain based languages.
(The check indicated that the domain settings are not valid. I have no clue on how or why).

The site seems to work, but not consistently AND site management behaves differently based on the rootdomain that is currently active. hidden link of hidden link

What would be the correct way to start debugging the above implementation AND what did I miss?

April 10, 2019 at 3:43 pm #3578105

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Can you please check these threads in detail:
https://wpml.org/forums/topic/nginx-config-for-a-different-domain-per-language/#post-669951
https://wpml.org/forums/topic/domain-per-language-dont-work-nginx/#post-652103

Regards,
Bruno Kos

The topic ‘[Closed] How to use WPML with different domains per language for NGIX’ is closed to new replies.