B
B
blabs2017-03-16 10:22:01
PHP
blabs, 2017-03-16 10:22:01

How to open a site using https in WordPress?

We plan to connect an SSL certificate and forcibly launch the site via https through the server. When we do this, the site becomes inactive due to the fact that wordpress launches all links via http by default.
How to translate all requests in wordpress from http to https?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
ommunist, 2017-03-16
@ommunist

First, put the certificate where necessary, then change the siteurl and homeurl to https:// and then
the plugin to help you Insecure contents fixer

I
Ivan Kozlov, 2017-03-16
@trampick

1 - Change all url in db from http://mydomen.ruto https://mydomen.ru, You can use wp migrate db plugin.
2 - In wp-config add

define('WP_HOME', 'https://mydomen.ru/');
define('WP_SITEURL', 'https://mydomen.ru/');
define('FORCE_SSL_ADMIN', true);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO']) {
    $_SERVER['HTTPS'] = 'on';
}

V
Vasya Petrov, 2017-03-16
@VasyaPertrov

wordpress fires all links via http by default.

wordpress "launches" as specified in its settings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question