How to run WordPress over HTTPS SSL

Once you’ve had your SSL certificate installed and have verified it’s working by manually going to https:// on your domain you now need to configure your website to force any connections to load over HTTPS.

In WordPress you can do this simply by going to the admin interface > Settings > General. Here you will see two settings we need to change “WordPress Address (URL)” and “Site Address (URL)”. By default they will start with http://, you need to change these to https://.

You can see how simple this step is below by viewing the images below.

Click the image above to view in full size.

This will now make any link in your WordPress site utilise https://.

This will not automatically redirect people from http:// to https:// unless they click a link on the site. To force a redirect to https without using any plugins in WordPress we simply add the following code to our .htaccess file above the default WordPress code:

#Force SSL on Entire Site
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

We can now simply add this via the File Manager in cPanel, to do this login to cPanel and go to the Files section and select File Manager. Double click on the line with “public_html” to enter the directory where your website files are located.

We now want to edit the .htaccess file, if this is not present we need to go to settings in the top right. Now toggle the option called “Show Hidden Files (dotfiles)” and press save.

You should now see a .htaccess file, click this once and press edit on the top bar. A prompt will appear about encoding check, simply press edit to continue. You can now copy/paste the code in below the original .htaccess content.

Click the image above to view in full size.

An alternative solution to using this .htaccess code would be to use a WordPress plugin that replicates the same behaviour but directly within WordPress. An example plugin is Really Simple SSL which is actively receiving updates from it’s developers and is well reviewed.

If you encounter issues while using the plugin Elementor, we would advise taking a look at their “Replace URL” tool which can be found under; Elementor > Tools > Replace URL Tab

If you need any assistance with enabling https on your install, feel free to raise a support ticket via your Client Area and we’ll be happy to help.