Best Guide to Setting up Encrypt SSL on self-hosted WordPress Sites 2022

Share:

WordPress Sites  Guide to Setting up Encrypt SSL


Normally, the first thing you are worried about after you finish setting up a WordPress website is installation of SSL Certificate. If you are supposed to convert from HTTPS to HTTP and have no idea how to do it, this guide is for you. 

Google and nearly all other search engines consider security as one of the top parameters when ranking websites. So transitioning from HTTP to HTTPS and installation of SSL certificates are more than imperative, since they make your websites secure. Google shows all non-SSL websites as insecure. 

Before starting the guide, let’s define some basic terms so beginner readers do not feel alienated. 

What is HTTPS All About?

When you enter a web address in a browser, you actually request your browser to fetch and display that page. The browser’s job now is to transmit your request to the website’s hosting server. This request may have to pass through several computers before reaching that website’s server. 

HTTPS is actually an encryption method that makes it harder for hackers to keep an eye on connection between the browser and the user. 

Data transfer is what we are doing all the time on the internet. Either it is a purchase or a simple login, we are sharing our personal information on the websites. A secure connection is paramount for secure data transfer. 

This is the step where the SSL certificate enters the picture. 


Each website gets a unique SSL certificate so it can be identified. Sometimes, servers pretend to be on HTTPS. A modern browser will warn the user and try to prevent them from connecting to the website if the certificate does not match.

If you are running a simple blog or small business website with no payment collection feature, you may see all of this information as irrelevant for you. 

Announcement Google Made in July 2018


Back then, Google announced some new plans for improving general web security. They encouraged all website owners to switch from HTTP to HTTPS and started  marking HTTP websites as insecure. 

In addition, Google stated that websites having SSL certificates will enjoy better search engine rankings. If you do not get it and your viewers try to view the HTTP version, Google will show them a non-secure warning. Think how destructive it is for your brand reputation. 

As a result, switching from HTTP to HTTPS and installing SSL certificates is critical for any website owner. If you have an eCommerce website, you should know that all payment companies like PayPal and Stripe will require you to have a secure connection.  

How To Get an SSL Certificate?


Fortunately, it is very easy and straightforward to get a SSL certificate. There’s also a significant chance you already have one if you have a WordPress website. All WordPress hosting companies offer free SSL certificates for their users. 

Simply look for the security section in your hosting dashboard. An SSL part is easy to access and locate. Please contact your hosting provider if you cannot access it.

You will have to buy it from someone, if your provider does not provide an SSL certificate.  

Grid Hosting offers a variety of excellent and economical web hosting options, all of which include free SSL certificates.

Get Now Free SSL Certificate  From Grid Hosting


Step-By-Step Procedure of Enabling SSL and HTTPS on WordPress


Hopefully, you have enabled SSL on your website by now. Now, it is the time to set up WordPress for SSL certificates and HTTPS protocol. There are two basic methods, one is manual, while the other one uses plugin. Most of the WordPress experts recommend the  manual method, so we will start from that. 

Manually Setting Up SSL/HTTPS in WordPress


Experts recommend this method because it is better from a performance perspective. You will, however, have to manually troubleshoot issues and edit wordpress files. Is that a difficult task? 

Well, you can also use the second method that uses plugin or hire a WordPress developer. If you think you can use this manual method, then get ready to edit WordPress themes and code files.

The very first step is to visit Settings and click General. There you will be updating your links. Update your wordpress and site URL from HTTP to HTTPS. 

Guide to Setting up Encrypt SSL on self-hosted WordPress sites - Grid Hosting

To store the settings, click Save Changes. Hereafter, wordpress will log you out and ask you to log in again. 

The next step is to configure WordPress redirects from HTTP to HTTPS. In your.htaccess file, paste the following code.

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTPS} off

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

</IfModule>

There is a possibility that you use the Nginx server. In that case you need the following code for setting up wordpress redirects. 

server {

listen 80;

server_name example.com www.example.com;

return 301 https://example.com$request_uri;

}

Remember that you have to replace example.com with your domain in the above domain. 

Following this procedure will save you from the troubles of HTTPS not working. From now onwards, WordPress will load all of your websites with HTTPS. 

On the WordPress admin area or log in pages, we sometimes choose to force SSL and HTTPS. In this situation, we have to configure SSL in wp_config.php file. 

Open the code and look for the line in the file that says, “That’s all, stop editing!”. Add the following line, right above this line. 

define(‘FORCE_SSL_ADMIN’, true);

Now WordPress is able to force SSL / HTTPs in the WordPress admin area. 

Congratulations! Your website is now completely prepared for SSL / HTTPS use. However, mixed content errors may come down your way. 

What Causes These Errors

There could be images, stylesheets, or scripts that are still using the insecure HTTP protocol in URLs. They are responsible for the mixed content errors in majority cases. There will be no secure padlock icon in the address bar of your website when this happens.

Guide to Setting up Encrypt SSL on self-hosted WordPress sites - Grid Hosting 2

If you see it, there are high chances you will also see a notification about it in the  address bar of the browser.

The Inspect tool will help you figure out the pieces of content that are served by insecure protocol. The console will show you a mixed content error as the warning.

Guide to Setting up Encrypt SSL on self-hosted WordPress sites - Grid Hosting 3

Majority of them will be images, iFrames and image galleries. However, there will also be some scripts and stylesheets that WordPress themes and plugins would have uploaded.

Method of Fixing a Mixed Content Error in a WordPress’s Database


Identify every instance of your former website URL that begins with HTTP in the database. Replace it with HTTPS. Yes, this task is difficult enough to carry out manually. 

For help, download, install and activate Better Search Replace plugin. Open the plugin, once it is activated. Under the ‘search’ field, type your website’s URL in the HTTP format. Then, in the ‘Replace’ section, type in the HTTPS version of your website’s URL.

Guide to Setting up Encrypt SSL on self-hosted WordPress sites - Grid Hosting 4

Just below that you will find wordpress database tables. For a full examination, select all of them. Finally, uncheck the box next to the ‘Run as dry run?’ option. Then you have to hit the ‘Run Search/Replace’ button.

The plugin will now go through your database and change all HTTP starting URLs with HTTPS URLs. The size of the database determines the time duration. 

You Might Also Like to Read :  Things to Consider While Buying VPS Hosting for WordPress

WordPress Themes: How to Fix The Mixed Content Errors 


Sometimes, poor wordpress themes result in a mixed content error. A well-optimized theme will never do it. 

First of all you have to find the resources where it originates from. For that, use the inspect tool of your browser. Find them and replace them with HTTPS. This could be a little difficult for beginners. Feel free to ask for developer help.  

How to Fix Them In WordPress Plugins


If the problem still persists, there must be issues with WordPress plugins. It is preferable to avoid tampering with plugins, and contact the plugin’s creator. Find an appropriate replacement if they do not reply or fail to grasp the problem.

How to Submit Your HTTPS Website to Google Search Console


How would Google know that you have moved your website to HTTPS. When they do not know, you will face SEO issues. It is your job to ensure that they are aware of the situation. To get started, log in to your Google Search Console account. Hit the button that says, ‘Add a property’.

Guide to Setting up Encrypt SSL on self-hosted WordPress sites - Grid Hosting 5

It will open a new pop up. There you will add a new https address of your website. 

Guide to Setting up Encrypt SSL on self-hosted WordPress sites - Grid Hosting 6

Following that, Google will ask you to authenticate your website’s ownership.

Use A Plugin to Set Up SSL/HTTPS in WordPress


Install and activate Really Simple SSL Plugin. Visit settings and click on SSL in the bottom right corner. Now leave everything to the plugin. It will check your SSL certificate and set up your WordPress website to use HTTPS. It will also deal with mixed content errors.

You may be wondering, why experts recommend the above complex procedure and not this simple method. The reason is plugin may leave negative effects on website’s performance. Plus if you deactivate the plugin the  mixed content errors may return to haunt you. 

Get Now Fast and Secure WordPress Hosting UK at affordable Price From Grid Hosting

Best UK Web Hosting for WordPress: Who Deserves The Title?


Grid Hosting provides excellent WordPress hosting services at affordable prices and sound technical support. If you cannot set up the host and install an SSL certificate, their support team will manage all of it for you. Their experts have decades of experience in web hosting. 

The Ball In Your Court


We have tried our level best to explain all methods that help you switch from HTTP to HTTPS as comprehensively as possible. Now, using manual method, plugin method, or finding some WordPress hosting that provides great SSL certificates in the UK is your choice.  

Follow and Join Us At Facebook for Discounts and Offers