How to redirect a WordPress site from HTTP to HTTPS

HTTP to HTTPS WordPress
  1. Login to WP-Admin
  2. Click “Settings” on the left menu
  3. Click “General” under “Settings”
  4. Change http:// to https:// in WordPress Address (URL) and Site Address (URL)
  5. Click Save Changes
  6. Now go to cPanel > File Manager
  7. Click the “Settings” button on the top right corner
  8. Tick “Show Hidden Files (dotfiles)” and click on “Save”
  9. You should now see a file named “.htaccess”.
  10. Right click on “.htaccess” file and click “Edit”
  11. Add the following code at the top in .htaccess:-
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.website.com/$1 [R=301,L]

12. Make sure you change “website.com” to your website domain and click “Save Changes” button on the top right corner while editing the .htaccess file.

With this method, your WordPress site should run on HTTPS and all links should auto-redirect from HTTP to HTTPS.

CEO & Founder of Sudoly.

Leave a reply:

Your email address will not be published.

Site Footer

Sliding Sidebar