R
R
Ruslan Makarov2015-12-25 09:52:07
WordPress
Ruslan Makarov, 2015-12-25 09:52:07

Why is the WP admin displayed incorrectly after moving to https?

Goodnight!
Installed support for the SSL host certificate and styles, etc., are no longer displayed.
I specified // in the place of the site address in the database - the site started working normally.
But the admin panel is still crooked:
500f2ccf8793475ca4f7f5cf5c42a163.png

I don’t understand what could be the matter, I ask for help ...
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MetaDone, 2015-12-25
@MetaDone

add to config

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

and in theme in functions.php file
add_filter('script_loader_src', 'metadone_script_loader_src', 20,2);
function metadone_script_loader_src($src, $handle) {
    return preg_replace('/^(http|https):/', '', $src);
}
add_filter('style_loader_src', 'metadone_style_loader_src', 20,2);
function metadone_style_loader_src($src, $handle) {
    return preg_replace('/^(http|https):/', '', $src);
}

the second item is not necessary, only if the site itself started to display crookedly after the move

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question