A
A
Anton Titov2018-05-21 04:32:25
Web development
Anton Titov, 2018-05-21 04:32:25

Site console on Wordpress on http, right?

A month ago, a site was created on Wordpress. A week after the creation, a certificate was received and https was connected to the site.
Actually the question is:
1. Is it normal that when entering the console (.....ru/wp-admin) a page with http opens, even if it is forced to register https first. If this is wrong, then
2. How to set up a redirect correctly? Adding the following lines to the htaccess file did not help.

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

and
RewriteEngine On
RewriteCond %{HTTPS} =off 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-05-21
@fubarblg

Hello!
1) no need to edit htaccess. (it will be updated automatically when changing urls, see point 2)
2) change the site address in the admin panel from http to https (Settings - General)
3) install the better search replace plugin and replace all urls (including the guid column) with https
4 ) most importantly, to enable the forced use of SSL for the admin add to wp-config.php

define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question