- Login to WP-Admin
- Click “Settings” on the left menu
- Click “General” under “Settings”
- Change http:// to https:// in WordPress Address (URL) and Site Address (URL)
- Click Save Changes
- Now go to cPanel > File Manager
- Click the “Settings” button on the top right corner
- Tick “Show Hidden Files (dotfiles)” and click on “Save”
- You should now see a file named “.htaccess”.
- Right click on “.htaccess” file and click “Edit”
- 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.