Skip to content Skip to sidebar

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

Problem:
If you're using the 'Use directory for default language' setting in WPML, you might encounter several issues:
1. Accessing /wp-admin redirects to a 404 page at /nl/wp-login.php.
2. The wp-login.php page shows an 'ERR_TOO_MANY_REDIRECTS' error.
3. The logout link redirects incorrectly and prevents logging out.
Solution:
We recommend setting up a root page to resolve these issues. This can be either a WordPress page or an HTML file. For detailed instructions on how to set up a root page, please visit our guide on using a directory for the default language.

If this solution does not resolve your issue or if it seems outdated or irrelevant 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. Should you need further assistance, please do not hesitate to open a new support ticket at our support forum.

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 10 replies, has 0 voices.

Last updated by Marcel 1 week, 1 day ago.

Assisted by: Marcel.

Author Posts
January 13, 2026 at 4:09 am #17723493

ankeV-3

If I use the setting " Use directory for default language":
1. the /wp-admin is redirecting to /nl/wp-login.php?redirect_to=https%3A%2F%2Fwp.wildtrails.be%2Fwp-admin%2F&reauth=1 and goes to a 404 page.
2. wp-login.php is getting a "ERR_TOO_MANY_REDIRECTS"
3. log out link goes to hidden link and is not letting me log out.

I have deactivated all other plugins and reverted to a WP theme and the issue is still happening.
If I deactivate wpml the issue is no longer happening.
If I deactivate the setting "Use directory for default language", the issue is no longer happening

January 13, 2026 at 12:52 pm #17725353

Marcel
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi,

do you have a staging environment where I can take a look?

I would eventually also need to request temporary access (WP-Admin and FTP) to your site
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private which means only you and I have access to it.

❌ Please backup your database and website ❌

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please add the Links to the […] Edit Screen, the Page/Post where you insert the […] and the corresponding Front End Page/Screen

Best Regards,
Marcel

January 14, 2026 at 5:15 pm #17730582
guillaumeS-18

Hello,

I have the same issue; I would be interested in a solution once found 🙂

Best regards,

New threads created by Marcel and linked to this one are listed below:

https://wpml.org/forums/topic/split-wp-admin-goes-to-a-404-page/

January 15, 2026 at 3:59 pm #17734800

Marcel
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi,

I’ve run several tests so far, but none of them resolved the issue.

Would it be okay if I create a copy of the site using a plugin such as Duplicator or WP All-in-One Migration so I can debug the problem locally? This would allow me to remove the .htaccess file and properly isolate the cause without affecting the live site.

Thank you.

Best regards,
Marcel

January 18, 2026 at 2:16 pm #17740336

ankeV-3

Yes of course. Thank you for looking into it

January 21, 2026 at 4:51 pm #17751522

Marcel
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Thank You! I’ve been able to confirm the issue within an isolated test environment, though it hasn't appeared in a clean reproduction yet. I am currently investigating this with our team and will update you as soon as we have more information.

Best Regards,
Marcel

January 22, 2026 at 11:56 am #17753570

ankeV-3

Thank you, I'm looking forward to finding a solution.

January 28, 2026 at 10:36 am #17770073

ankeV-3

Hi Marcel,
Do you have an update on this? Thank you.

January 28, 2026 at 6:24 pm #17771626

Marcel
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi,

it works again. The issue was the following:

Pressing the save permalink option in WP should write this rules in your .htaccess file:

RewriteRule ^nl/wp-login.php /wp-login.php [QSA,L]
RewriteRule ^en/wp-login.php /wp-login.php [QSA,L]
RewriteRule ^fr/wp-login.php /wp-login.php [QSA,L]

They where even set, but bypassed because you had already rules set at the beginng of your .htaccess file.

I removed all inside

"# BEGIN Webhosting WordPress"

to

"# END Webhosting WordPress" and that was the solution :).

Best Regards,
Marcel

January 29, 2026 at 12:00 pm #17773347

ankeV-3

Thank you! That solved the login page perfectly.

I'm still having issues with the root landing page.

That is the main page set in WPML > Languages > Language URL format > Use directory for default language > "what to show for the root url: a page".

It redirects to a page url (which I don't want to) and then shows a ERR_TOO_MANY_REDIRECTS

Do I create a new ticket for this or can I use this one since it might be related?

Thank you,
Anke

January 29, 2026 at 3:11 pm #17774429

Marcel
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi Anke,

You’ll need to use a root page. This can either be a WordPress page or an HTML file. You can find the details here:
https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/

If you run into any issues with the setup, feel free to open a new ticket and ask for me directly.

That said, as this ticket concerns the backend login, I will mark it as closed now.

Best regards,
Marcel