Should I change wp-config for SSL setting to change define('SITE_URL','http://www.example.com/'); to define('SITE_URL','https://www.example.com/');

  • 1
    it shouldn't be necessary if you've updated your database correctly
    – Tom J Nowell
    Jul 31 '18 at 16:37

You better use a .htaccess file, where you force https with:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The file goes in the root folder of your WP installation. If there is any, put this code on the beginning of the existing file.

And you can then change the settings in the WP backend Settings, if neccessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.