Wordpress get_template_directory_uri() returns http instead of https

前端 未结 7 1375
暖寄归人
暖寄归人 2021-02-19 03:32

We have recently applied SSL certificate on our website and we want all our url to have https:// protocol.

Once we moved our website to https://, our website broke down

7条回答
  •  庸人自扰
    2021-02-19 03:54

    This worked for me like a charm, added to wp-config at the end:

    define('FORCE_SSL_ADMIN', true);
    define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
    define('WP_SITEURL', WP_HOME);
    

提交回复
热议问题