Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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:

Template Name: Root redirect
wp_redirect( home_url() );

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:

This topic contains 18 replies, has 3 voices.

Last updated by stevenM-21 1 year, 4 months ago.

Assigned support staff: Ricardo Alday.

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


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


Note: by browser redirection we mean browser language redirect (now it points to the root page that points to

October 25, 2018 at 1:48 pm #2849978


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

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


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:

-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,


October 25, 2018 at 1:57 pm #2850063


Hello Otto,

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