How to move website from http to https through .htaccess in wordpress

By | April 18, 2019

Let’s read about moving wordress website from no secure http to secure https . A small code in .htaccess could make you relax and without installation any plugin your wordpress website would be moved to https.

Here are the steps:

Just login to your cpanel , and find the .htaccess file and put following code in it.

. htaccess code for moving website from http to https.

<IfModule mod_rewrite.c>

   RewriteEngine On

   RewriteBase /

   RewriteCond %{HTTPS} !=on

   RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

   # BEGIN WordPress

   RewriteRule ^index\.php$ – [L]

   RewriteCond %{REQUEST_FILENAME} !-f

   RewriteCond %{REQUEST_FILENAME} !-d

   RewriteRule . /index.php [L]


# END WordPress

.htaccess file not found in cpanel ?

Some cpanels hides the files starting with  .(dot extension) , so may be its hided from the cpanel ,for showing  .htaccess file you need to follow the following procedure.

Click the settings tab and then check  the show hidden files which is highlighted in the yellow.


Finally save it . You will see the .htaccess in your cpanel. Put the script and save your website from heavy load of the plugins.


Cheers “

Leave a Reply

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