Skip to content Skip to sidebar

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

Problem:

The client is experiencing a 'Too many redirects' issue on the WordPress login page after activating the WPML Multilingual CMS plugin. This issue prevents access to the admin area and also breaks the French homepage when the plugin is deactivated.

Solution:

First, we recommend increasing the WordPress memory limit as it is currently below the minimum requirements for WPML.

Next, flush your website's cache, including server-level or services like Cloudflare, if applicable.

If the issue persists, follow these steps:

1) Check WPML → Settings to ensure you haven't enabled translation for login/registration pages.

2) Test if the issue occurs with only WPML plugins active, all other plugins and cache disabled, and while using the default WordPress theme.

Additionally, verify that the WP URL and Site URL configurations match, as discrepancies were noted in the debug information.

Important: Always ensure you have a full backup of your website before making any changes.

If this solution doesn't resolve your issue, please open a new support ticket with us.

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

Last updated by Marsel Nikolli 1 year, 7 months ago.

Assisted by: Marsel Nikolli.

Author Posts
December 15, 2023 at 8:19 am #15070057

Yann Gourvennec

Hi,
I have a "Too many redirect" issue on WP login page

visionarymarketing.com/wp-admin will lead to this error.

I deactivated all my plugins one by one until I stumbled upon the culprit

>>> WP WPML Multilingual CMS plugin

When I deactivate it I can access visionarymarketing.com/wp-admin
When I deactivate it my French home page is broken.

Is there a workaround ? I need this plug in but this issue is crippling.
(a workaround I find is by calling a deeplink like vismktg.info/admin but this is no long term solution).

I believe you have a snag in your code.

Screenshot 2023-12-15 at 09.19.28.png
December 15, 2023 at 5:09 pm #15075535

Marsel Nikolli

Hi,



Thank you for contacting WPML Support, I will be happy to help you.

It might not be related, but according to your debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default and the minimum requirements for WPML are 128 MB. (Kindly check this page: https://wpml.org/home/minimum-requirements/)

You can increase it by adding the following code in your wp-config.php file right before the line:

/* That's all, stop editing! Happy publishing. */


/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

After, please could you flush the cache of your website (including in a server level or Cloudflare if you are using such service) and see if the issue persists.

* Note: Please make sure you have a full backup of your website before making any changes.

Let me know how it goes.

Regards,
Marsel

December 17, 2023 at 5:02 pm #15079339

Yann Gourvennec

Hi Marsel, I did as you said and got the same result.
Cheers

Screenshot 2023-12-17 at 18.01.52.png
December 18, 2023 at 10:03 am #15082173

Marsel Nikolli

Hi,

I noticed from the debug information you provided that the Site URL and WordPress URL are set to different languages (please check attached image), one set to the main language and the other on the translation language, you'll need to set them bot to the main language.

*Note: these are the values set on WP-Admin -> Settings -> General:
- WordPress Address (URL)
- Site Address (URL)

Since you don't have access on the wp-admin you could:

1) You could go to the file wp-config.php, and add the following code:

define( 'WP_HOME', '<em><u>hidden link</u></em>' );
define( 'WP_SITEURL', '<em><u>hidden link</u></em>' );

This will overwrite the values on the WP-Admin -> Settings -> General page, you won't be able to edit those values anymore.

2) You could change the values directly on the database, please for more detailed information about this option check the official WordPress documentation:
https://wordpress.org/documentation/article/changing-the-site-url/#changing-the-url-directly-in-the-database

Let me know if this works out for you,
Marsel

site-home-URL.png
December 18, 2023 at 12:48 pm #15084255

Yann Gourvennec

Hi Marsel,
As a matter of fact I still have access as long as I use a workaround by looking at a deep link such as the one encapsulated in vismktg.info/admin.
I checked the WP URL and the Site URL but they are both the same on my side.
Before I go the hardcoding route, can you please confirm?
Is it due to some inconsistency in the database?
Will it be fixed by directly going into the database? Or is there another prerferred route?

Screenshot 2023-12-18 at 13.45.06.png
Screenshot 2023-12-18 at 13.46.45.png
December 18, 2023 at 1:13 pm #15084531

Marsel Nikolli

Hi,

Thanks for the clarification.

1) Can you please check if you haven't maybe enabled to translate login / registration pages, from WPML → Settings and scroll to log in and registration pages.

2) Other than that I would suggest checking if the issue still happens when only WPML plugins are enabled, all others plugins and cache disabled, while using the WP default theme.

3) Between making the changes on the database and the wp-config.php option, I would suggest the last one to try first and see if that works without touching the database.

-----

* Note: It is strange though that from the debug info I have a different configuration for the WP URL and the Site URL meanwhile you have a different one. Maybe it is worth checking the server configuration (on how the website is setup).

Important: Please make sure you have a full backup of your website before trying any option suggested.

Let me know how it goes,
Marsel

December 20, 2023 at 5:44 pm #15105347

Yann Gourvennec

Hi Marsel, you've hit the name on the head!
Number one issue did the job.
I unticked the "Allow translating the login and registration pages" box and it did the job. I tested this on multiple cookie-free browsers in incognito mode and it worked.