you need to update all css,js and media file path with https and update all url in database with like
http://mysite.com to https://mysite.com
Use the plugin “better search replace” to do the replacement suggested above.
Ok, thank you to both of you.
I did that and I don’t know if it works or not because I’m falling into a problem I’ve already seen before and is probably at a higher level. Actually, my wordpress server is not the same than my nginx one (please find my config at the end of this message). Then, when I switch into HTTPS and I try to connect (https://mariage.herisson-soula.fr/wp-login.php), I am forwarded to https://mywordpress.local/wp-login.php, which fails.
Thank you for your help,
Joan
## nginx.conf ##
…
server {
listen 443 ssl;
server_name mariage.herisson-soula.fr;
ssl on;
ssl_certificate XXX;
ssl_certificate_key XXX;
add_header XXX;
...
location / {
proxy_pass http://mywordpress.local;
}
}
…
Hello,
ok I figured out the local forwarding. I am now on front of the following message when I installed and try to reach wp-login.php: “The page isn’t redirecting properly”.
Logs on WP show 16 attemps to this page before showing this message on the browser.
Anyone has an idea about what’s going on?
Thank you,
Joan
Hi there,
the problem of infinite redirections is solved just by adding the following lines in nginx.conf:
map $http_x_forwarded_proto $thescheme {
default $scheme;
https https;
}
proxy_set_header X-Forwarded-Proto $thescheme;
The following instruction already there in the wp-config.php do the trick:
if (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] === ‘https’) {
$_SERVER[‘HTTPS’] = ‘on’;
}
No need to add extra “define(anythingelse)” nor modify database URLs.
Best,
Joan