Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
A WordPress website is not accessible. One of the following errors is shown in a browser:
PLESK_INFO: The page isn't redirecting properly
or
PLESK_INFO: ERR_TOO_MANY_REDIRECTS
-
In Mozilla Web Console or Chrome Web Inspector there are endless redirects from www.example.com to example.com and vice versa.
-
The solution from this KB article did not help.
Cause
Invalid WordPress configuration.
Resolution
-
Log into Plesk.
-
In Plesk go to Domains > example.com and click File Manager and open the file wp-config.php.
-
Add the code below at the bottom of the file right before
?>
:CONFIG_TEXT: define('WP_HOME','http://www.example.com');
define('WP_SITEURL','http://www.example.com'); -
If the issue still occurs, open the file _wp-config.php _and change the records to records the below:
CONFIG_TEXT: define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');Note: This can also be done via Domains > example.com > Wordpress > Log in > Settings > General > WordPress Address (URL) and Site Address (URL).
-
Rename plugins directory via Domains > example.com > File Manager (
wp-content/plugins
directory) or disable WordPress plugins one by one to find the faulty one.
Comments
8 comments
It does this for every single site I set up.. Is there a fix for that ?
Are you sure that the following symptom is actual for every affected website:
2. In Mozilla Firebug or Chrome Web Inspector there are endless redirects from
www.example.com
toexample.com
and vice versa.If yes, this means that every WordPress website is misconfigured.
Please check that WP_HOME and WP_SITEURL are the same and that preferred domain is set to the same value as WP_HOME under Plesk > Domains > example.com > Hosting Settings
That should be done for every affected website.
Yes.. If I modify wp-config.php WP_HOME and WP_SITEURL the problem goes away.
My question is why do I have to do that to every single wordpress site I create via the Wordpress Tool ?
Am I missing a configuration step?
Hello,
Could you please describe how the WordPress was configured? I see here two possible ways:
- Install WordPress right after site creation (WP_HOME and WP_SITEURL would be http://example.com)
- Configure SEO 301 Redirection in Plesk (Redirect would works from http to https)
In this case, "too many redirects" error may occurs.
- Configure SEO 301 Redirection in Plesk (Redirect would works from http to https)
- Install WordPress after that (WP_HOME and WP_SITEURL would be https://example.com)
In this case, all will be configured properly and WordPress would work as expected.
So, I recommend you to install WordPress after configuring all redirections in Plesk.
If this does not work for you, please get back to us.
It works nicely. Thank you.
I think plesk is a great control panel, but it still has some issues that have to be fixed.
@Alwan Rosyidi
Thank you for for your kind words about Plesk :) We are working hard to fix those issues and make Plesk even better!
Another source of "too many redirects" when using some Plesk configurations with Wordpress is SSL setup. If you're using Cloudflare you may need to change the SSL setting from "Flexible", the default value, to "Full (Strict)" in the Crypto tab if you aren't using Cloudflare's certificate.
Hello @Cowboy Bill,
Thank you for your notice!
We also have the article on this matter and I modified the current one with this additional information.
Please sign in to leave a comment.