How to Force HTTPS on Your WordPress Site Print

  • 3

WordPress remains one of the most widely used content management systems (CMS) today, which makes securing your WordPress site a top priority. Its popularity continues to grow, thanks in large part to the vast ecosystem of plugins and themes that simplify its use. In this guide, we’ll focus on a plugin called Better Search Replace. This tool is extremely helpful for fixing a common problem you might encounter when securing your WordPress site—mixed content. Without plugins like this, troubleshooting and resolving those issues would be significantly more difficult.

Primarily this is because one of the easiest ways to secure your managed WordPress site is with the installation of a free SSL certificate and then forcing all connections to be over HTTPS. This has some benefits including securing connections to the site and boosting its SEO (Search Engine Optimization) rankings. Still, WordPress can also cause some mixed content issues surrounding existing non-HTTPS content including images and other media.

Troubleshooting WordPress Mixed Content

1. Log in to your WordPress admin area, to do this most of the time you can add /wp-admin to your WordPress website URL for instance:

https://yourdomain.tld/wp-admin

2. After logging in to your WordPress admin area head to the plugins menu found in the left sidebar.

3. Find the above-mentioned plugin "Better Search Replace" (using the search feature), first click 'Install' and then 'Activate'.

4. Now that Better Search Replace is installed & activated you can start using the tool by heading to the “Tools” section found in the left sidebar.

5. That Better Search Replace is installed & activated you can start using the tool by heading to the “Tools” section found in the left sidebar.

6. When in 'Tools', there are two options:

  1. enter your domain in the "Search for" field, preceded by 'http://'
  2. enter your domain in the "Replace with" field, preceded by 'https://'

For example:

http://yourdomain.tld - Search For.

https://yourdomain.tld - Replace with.

7. Moving on using CTRL+CLICK select all the tables in the “Select Tables” section, this will ensure that the plugin finds any instance of the HTTP address stored in the database. From here use the Dry Run feature (checked by default) and click “Run Search and Replace” to run it as a dry run or uncheck to run the command on your databases.


Was this answer helpful?

« Back