1.SSL対応&セキュリティ対策を施す

WordPressを入れ終えたらすぐに以下のプラグインを入れる

Really Simple SSL

https://www.jp-secure.com/siteguard_wp_plugin/

※SiteGuadPluginを入れると管理画面へのログインURLが変わるので、要注意!

 

1.さらにセキュリティを高める

↓wp-adminにアクセスされた時に、ログインページへリダイレクトするのを防ぐ

これをfunction.phpの中に入れる。(入れ方見すると、サイトが壊れるのでよくわからないうちは作業しないほうがいいです)

add_action('init', 'remove_default_redirect');
 
function remove_default_redirect()
{
    remove_action('template_redirect', 'wp_redirect_admin_locations', 1000);
}
 
 
add_filter('auth_redirect_scheme', 'stop_redirect', 9999);
 
function stop_redirect($scheme)
{
    if ( $user_id = wp_validate_auth_cookie( '',  $scheme) ) {
        return $scheme;
    }
 
    global $wp_query;
    $wp_query->set_404();
    get_template_part( 404 );
    exit();
}