Fixed Knowledge Base

Get all the help you need here.

Activate an SSL

Posted 04th October, 2018

Having an SSL certificate installed on a website is very important for a variety of reasons, from security to SEO. For a better internet, we should all be encouraging the use of SSL on all websites.

More about SSLs in general elsewhere in the knowledge base.

To enable SSL on your Wordpress site:

  1. Log into your wp-admin panel
  2. Navigate to Settings >> General
  3. Update your Wordpress Address and Site Address by replacing http with https.
  4. Log into your file system on your hosting account. Using your favorite text editor open the .htaccess file and add the following redirection:

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

This redirect users to your https:// website.

To force HTTPS login on the admin area:

If you wish to force the HTTPS protocol on log in , you can add the following line to your wp-config.php file after your SSL has been installed:

define('FORCE_SSL_ADMIN', true);

Mixed content errors

After installing your SSL certificate your browser could show a "mixed content" warning for every element of your site that still loads over HTTP.

To fix the issue you could follow these steps:

  1. Ensure your database is backed up.

  2. Use a text editor (such as sublime or notepad++) and replace all occurrences for http://yoursite/ to https://yoursite/ in a second copy of your database, for better results you could use a search and replace script instead.

  3. Replace your current database , by dropping all tables of it from phpMyAdmin and uploading your modified version from Import>>Choose File>> Go