How to force a WordPress site to redirect HTTP to HTTPS for securing the whole site?

1964

How are you all? I hope all of you are fine. Today with which subject I will talk that is impelling to secure an SSL in particular WordPress page.

Impelling to secure SSL in particular WordPress site.

https-secure

Secure SSL in particular WordPress page:

If in your web server SSL is activated, then that should be used for your blog’s security. It is a very easy thing to activate SSL in particular WordPress page.

You can only do that through pasting following code in function file (functions.php) of your theme. In case of this, to remember in which page you want to activate SSL, you have to make particular that page or tune ID.

ssl-secure

function wps_force_ssl($force_ssl, $post_id = 0, $url = '') {
if ($post_id == 25) {
return true
}
return $force_ssl;
}
add_filter('force_ssl', 'wps_force_ssl', 10, 3);

Work is finished. If these few things are done, then SSL will be activated in that particular WordPress page.

I hope this tune will work for you. Thank you for reading this article. If there is any mistake, then forgive me. If you face any problem, then don’t forget to comment. If you think the article is beneficial then obviously share it.

Also Read: