HTTPS Routing After WordPress SSL Setup

WordPress has become the most popular and most flexible CMS system in the world. It’s been used for blogs, web sites and even more commonly eCommerce operations. SSL certificates are thus becoming an absolute necessity.  As a bonus, SSL certificate will affects your SEO rankings positively with Google soon to not rank a site that does not have a valid certificate and issue a browsing warning,=.

But even you installed a SSL certificate to your website, it can be still reached over http:// links and not over https . In such a case, it may be necessary to make some modifications through the database and .htaccess file.

IMPORTANT! : If you have a pre-installed WordPress cached plugin (eg wp_supercache), please disable it!

We will show you the two important things you need to do if your website links do not start with https:// .

1- Modification via database

First access your WordPress database through your hosting service’s mysql management (ın most situation it is phpMyAdmin) software;


If you are using one of our cPanel VPS, you can see the phpMyAdmin under database segment of cPanel.

Click the + sign next to the database. Then click on wp_options or prefix_options (your prefix can be different in our demo it is ss_);

Here you will see two different lines which is called siteurl and home . These are the parts we will edit to http or https ;

To edit, we need to double-click on the top of line and we can update our link to https://

By just pressing ENTER after each edit of the box you can updated the value;

Now we have completed the database modifications.

2- Add https forwarding code to .htaccess file

It is now time for our website to be forced to use https, which means that all links (including the main login) are opened as https

Always be sure to first take a backup of your htaccess file before making any changes! Editing the htaccess file incorrectly can completely break your web site.

We can edit the .htaccess file in two way. If you are using cPanel you can edit the file directly in File Manager. Right click -> code edit as below.

.htaccess Cpanle File Manager

Second option is download the .htaccess file which is located in the public_html folder of your hosted WordPress host via an FTP program or WinSCP.

Edit .htaccess file with notepad or code editor such as Notepad++. We will add the following code to our domain address under RewriteEngine On parameter;

RewriteCond % { SERVER_PORT } != 443
RewriteRule ^ https : //{REQUEST_URI} [NS,R,L]

The contents of the .htaccess file you need to see are;

After we edit our .htaccess file, we can upload it via FTP and write over the old one and complete the process.

After that, your WordPress site will be fully redirected to https: // .

Need help purchasing and installing your certificate? We offer a range of SSL certificates – let us know how we can help 🙂

Leave A Comment?