In this tutorial you will know How to force specific pages to be secure, ssl, https. This is very simple & easy snippet to use in your current WordPress website.

It very easy code, you can change this code as per your requirement. Open your functions.php file from your current active wordpress theme.

http-to-https

Add Filter

Below filter will force to redirect your web url from http to https.

Add below snippet in your theme’s functions.php file.