Skip to main content

How To Install SSL On WordPress For Free!

By April 10, 2017August 17th, 2021Website

In this guide you will learn how to install SSL on your WordPress site for free!
By doing so, your URL address will change from HTTP (Hypertext Transfer Protocol) to HTTPS (Hyper Text Transfer Protocol Secure) allowing you to install confidence in your users by showing them your website is secure.

Install SSL On WordPress

 

What Is HTTPS And SSL?

HTTP is a protocol (set of rules) that is used to determine how data is exchanged on the internet.
HTTPS is simply the secure version of HTTP.
SSL (Secure Sockets Layer) is the technology that turns HTTP into HTTPS.

HTTPS ensures that the data that is being exchanged is encrypted so that if a hacker steals your password using an attack such as Man-In-Middle, they won’t be able to see it.

For example, say your password was HelloPeter and that it was intercepted by a hacker, below is how it will be viewed by the hacker.

Plain HTTP Password: HelloPeter

Encrypted HTTPS Password: EnCt2916194248137ad2075925115fe9a74f0b29b25ed916194248137ad2075925115cdh4rTH3YQL=IwEmS

 

Why You Should Install SSL On WordPress

  1. 1. WordPress.org announced that in 2017 they will be implementing features in WordPress which require you to have HTTPS enabled.
  2. 2. Google has stated that adding SSL to your website will give you a minor SEO boost.
  3. 3. The green padlock on your customer’s browser indicates that you take security seriously and gives them confidence.

 

How To Install SSL On WordPress For Free

Believe it or not, most hosting companies have a feature called AutoSSL (or something similar) that is already enabled on your cPanel.
This means that all you need to do is simply change your website URL to use HTTPS.
I will explain to you how to make this change in detail below.

So how do you know if your web host offers AutoSSL?
The easiest way to find out is to simply ask them by Logging a support ticket or by calling them.
If they do not offer AutoSSL, you can ask them if they support Let’s Encrypt which is another free SSL certificate.

 

How To Install SSL On WordPress Using AutoSSL

Before you continue any further, I highly recommend you first backup your website.

Replace HTTP With HTTPS

    1. 1. The first thing you need to do is to find and replace all of HTTP with HTTPS on all of your URL’s.
      The fastest way to do this is to use the plugin Better Search Replace.Be very careful with this plugin as it will search and replace within your database.
    2. 2. After you install the plugin click on Tools and then on Better Search Replace.

Tools - Better Search Replace

    1. 3. In Search for field, copy and paste your URL address from your browser and trim it down to your main domain.
      In the Replace with field, add an S to https (screenshot below).
    2. 4. Select all the tables in the list by clicking on the first line, holding down the Shift key on your keyboard, scrolling down to the bottom and clicking on the last item in the list.
      If the whole box is blue it means you have successfully selected all of the tables (screenshot below).
    3. 5. Uncheck the Run as dry run box and click on the Run Search/Replace button.

WordPress Change HTTP To HTTPS

  1. 6. If you have HTML code in any of your Widgets that is used to create links, you will need go and manually replace http with https.

 

Redirect HTTP To HTTPS

You will now notice that your website is using HTTPS, however, if you enter your website’s URL address into your browser with http instead of https, it still still load and be insecure.
For this reason we must redirect HTTP to HTTPS, so when a user goes to http://www.YourWebsite.com it will automatically redirect them to https://www.YourWebsite.com

To do this you will need add some code to your .htaccess file which is located in your website’s main directory.
In order to see the .htaccess file you will need to connect to your web server using FTP because if you connect using the File Manager in your cPanel you will not be able to see the file.

Once you have located the file, download it to your computer and open it with a text editor such as NotePad (I recommend Note++ or Atom for coding).

By default, your .htaccess file will look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

If yours looks different then it means that it has been changed by a plugin you are using or by your developer, either way the below steps still apply.

Below the line RewriteEngine On copy and paste:

RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Your .htaccess file should now look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Save the file, upload it back onto your web server and replace the existing file.

Now if you visit your website using HTTP it will automatically redirect you to the HTTPS version.
For example: http//www.YourWebsite.com will redirect to https://www.YouWebsite.com.

 

Change Your URL Address In Google Analytics

Since you you have now changed your URL address from HTTP to HTTPS, you will need to update it in Google Analytics.
If you do not update, your analytics statistics will drop to 0 starting from the day you made the change.

To update the URL address in your Google Analytics account:

    1. 1. Login to the Admin dashboard and click on Property Settings.

How To Install SSL On WordPress - Google Analytics Update

  1. 2. Under the heading Default URL change http:// to https://

Install SSL WordPress - Google Analytics URL

 

Conclusion

Setting up secure SSL on your website has many benefits for both you and your customers.
HTTPS is the way of the future and it’s pretty easy to setup using the instructions above.
However, once you change from HTTP to HTTPS, don’t forget to update your URL in places such as Google Analytics, Google Search Console and in any other systems you use.

Did you manage to install SSL on WordPress for free?

4 Comments

Share Your Thoughts

 

PeterStavrou.com