Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

Problem: Site does not redirect to correct language and loads old frontpage

Solution: 1. Create a template page into your theme and call it for example page-root-redirect.php.
- Here, add the following code:

<?php
/*
Template Name: Root redirect
*/
wp_redirect( home_url() );
exit;
?>

This will redirect to your main language folder.

2. Now go to WPML -> Languages :
- Select 'Different languages in directories'
- Enable 'Use directory for default language'
- Select 'A page Create root page.'
- And assign the 'Root redirect' template for it.

Now, when you go to your main site, you'll be redirected to your main folder.
Remember to remove your cookies or try an incognito view.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/

This topic contains 18 replies, has 3 voices.

Last updated by stevenM-21 1 year ago.

Assigned support staff: Ricardo Alday.

Author Posts
October 25, 2018 at 11:07 am #2849512

stevenM-21

Quick update: we have contacted the Developer of our theme and they pointed us in the correct direction that wprocket caused the caching. We have contacted our host who confirmed there was a conflict between WPML and wprocket. We restored htaccess to default, uninstalled/reinstalled wprocket and caching problem was solved.

However browser redirection is still not working. Do you have any update on this issue?

October 25, 2018 at 11:12 am #2849523

stevenM-21

Note: by browser redirection we mean browser language redirect (now it points to the root page that points to peaceofcake.be/nl)

October 25, 2018 at 1:48 pm #2849978

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I am Otto from WPML second tier support.

I manage to make the redirection work for the root page following these steps:

- Instead of using root.php as the root page.

- I created a root page and assigned a template for the redirection.
In the summary of this ticket you have a detailed explanation:
https://wpml.org/forums/topic/after-recent-updates-root-link-displays-blank-but-language-directories-work/

-Then if you go to / you are redirected to your browser's language

I created a test site so you can check it here:
hidden link

the main language is French, and as secondary languages are Spanish and English. So if you visit the site with a browser in English or Spanish you should be redirected to the right language.

You may check the site settings, following this link you will be automatically logged in:
hidden link

Can you please test it on your end?

Let me know how it goes, please.

Kind regards,

Otto

October 25, 2018 at 1:57 pm #2850063

stevenM-21

Hello Otto,

Your answer solved my problem in 1 minute. Thank you so much for your help.

Best
Steven