Answer the question
In order to leave comments, you need to log in
How to migrate WordPress to a domain with SSL?
I am transferring the site from local to hosting. I changed the old domain in the database to a new one with http: - the site works (the browser really swears that it is unsafe, etc.), but I can’t log in - after submitting the form, the page simply reloads. Changed the domain in the database to https: - after that the site does not work at all, the error "ERR_TOO_MANY_REDIRECTS" is issued. Tried adding to wp-config.php define('FORCE_SSL_ADMIN', true); - gave no result.
Answer the question
In order to leave comments, you need to log in
Faced with such garbage more than once. Another difficulty is that redirects are cached at different levels. And it's better to check through third-party services, like bertal. Goes to the right page.
By transfer:
1 - change the urls from http to https. Better to do it with a plugin.
2 - Just in case, add to wp-config :)
define('WP_HOME', 'https://mydomen.ru/');
define('WP_SITEURL', 'https://mydomen.ru/');
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO']) {
$_SERVER['HTTPS'] = 'on';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question