How To Use SSL & HTTPS With WordPress |

Congrats, You are Subscribed to Receive Updates.

How To Use SSL & HTTPS With WordPress

How To Use SSL & HTTPS With WordPress. Now a days providing Security over your WordPress site, by encrypting with SSL becomes more secured and get more peoples can trust your site.  So going with SSL is making your users getting strong opinion about  your WordPress. they are about to believe and pay attention to your site.   Let’s get into the topic, how to make your site HTTPS or Force SSL.   There are two options for you.

  • WordPress Plugin
  • Custom code and make it work.


Let’s take first one. and see how easy to do this.

WordPress Plugin

There are fewer WordPress plugin available to do this operations.  Which is more useful to the non programmers.  Also , no risks involved it in. and those plugins are free to use.

1. WordPress HTTPS (SSL)

This plugin is very simple just install and play. no need to work on more settings options.   You can get this plugin from here.  Download.

2. WP Force SSL

Redirect all traffic from HTTP to HTTPS to all pages of your WordPress website. Get this plugin from here . See more 

Custom code and make it work

We need to follow certain steps to get the Force SSL. Let’s do the steps one by one.

1. adding the following code helps to understand our WordPress should run with SSL.

define('FORCE_SSL_ADMIN', true);

Just add the above line on your ” wp-config.php”  which is there in the root of your WordPress.

2.  if your wordpress is hosted on reverse proxy, you need to do the following step as well.

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')

add the above line on your “wp-config.php” . This will handle the reverse proxy operations.

3. We need to rewrite the rules to take effect and force all login and back end urls by adding the below code on your ” .htaccess ” .

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\ HTTP/ [NC]
  RewriteCond %{HTTPS} !=on [NC]
  RewriteRule ^/?(wp-admin/|wp-login\.php){REQUEST_URI}%{QUERY_STRING} [R=301,QSA,L]

Here change the ” ” to your site.  That’s it, check the site and if you have problems comment below.


About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

Comment Below

Your email address will not be published. Required fields are marked *


Current ye@r *