Skip Navigation

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 15 replies, has 2 voices.

Last updated by Joanna 3 years, 7 months ago.

Assigned support staff: Joanna.

Author Posts
September 4, 2017 at 2:24 pm #1358005


Hello @kamalpreets,

If you decide to use the "Use directory for default language" option, then the main domain (without the language directory) will be the URL of the root page. For the root page itself you have two options:
1. You can have a simple HTML file that you need to create yourself and upload to your installation. Then, in WPML->Languages->Language URL format, you need to add the URL path. If you decide to provide the relative path, adding the file name only means that the file is placed in the root WordPress installation folder (see rootpage_htmlfile.png).
2. You can create a WordPress page that will be your root page (see rootpage_page.png). This will be a special page that won't have a language code so you won't see it on a page list. The only place to create and manage the page will be in WPML->Languages->Language URL format. If you choose this option, you'll be able to create a root page just like any other page on your site.

It's up to you which option you choose. In both cases, if you set Canada to be your default language and the users chooses Canada on the root page (main domain), the language won't get switched and the warning box won't appear.

You already have a nice intro page that may become your root page. If it's not an HTML file already, it should be easy to recreate your intro page as an HTML file. Just remember that the root page cannot be a PHP file if you choose the HTML option. If you want to have any PHP code on the root page, choose the page option and assign a custom template to it (where you can use a PHP code).