WordPress Force HTTP To HTTPS Redirect

1. Install WP All In One Security Plugin
2. Go to Spam Prevention - Check the Block Spambots From Posting Comments:
  3. Go to General Settings - change
default url from HTTP to HTTPS
Requirements:
  1. Host has already SSL installed
2. HTTPS hosting

or

RewriteEngine On
RewriteBase /

  RewriteCond % {
    ENV: HTTPS
  } != on
RewriteRule ^ .*$ https: //%{SERVER_NAME}%{REQUEST_URI} [R,L]

  # BEGIN WordPress
RewriteRule ^ index\.php$ - [L]
RewriteCond % {
  REQUEST_FILENAME
}!-f
RewriteCond % {
  REQUEST_FILENAME
}!-d
RewriteRule. / index.php[L]

or

RewriteCond % {
  HTTPS
} != on RewriteRule ^ https: //%{HTTP_HOST}%{REQUEST_URI} [L,R=301]