How to update all HTTP URLs to HTTPS in WordPress

July 26, 2020 1:28 am

Have you ever faced an issue with forcing HTTPS on your website as there are still some insecure links that are being loaded? If so, keep reading further as we have got the fitting solution for you.

In the following post, we'll look into how we can replace all the links in the WordPress database to https from http. All this can be done automatically by simply using a free plugin called 'Search & Replace'.

For this demonstration purpose, we're using whose mixed content details looked like this:

Here are the step by step procedure which you can take:

  1. Login to your WordPress admin area

  2. From the menu in the left hand side bar - click on Plugins > Add New as in the image below:


  3. Search for "Better Search Replace":
  4. Click on "Install Now" next to "Better Search Replace" plugin box:
  5. Click on "Activate" next to "Better Search Replace" plugin box:
  6. Now, as the plugin is active. From the menu in the left hand side bar - click on Tools > Better Search and Replace as in the image below:
  7. In the page that appears - enter "http://" for "Search for" and "https://" for "Replace with". You can just select "wp2m_postmeta" or simply select all if it's just an abandoned website and the links may have also been in the options table. Please note "wp2m_" might just be "wp_" or any other format as you set them. You can click on "Run as dry run?" to just review it or uncheck it to just action. For the demonstration here, we'll leave the option unchecked. Click on "Run Search/Replace" to execute the changes.
  8. Once it's complete - you'll see something like this at the top of the page, which details the actions taken:
  9. Congratulations! You've successfully updated all your http URLs to https. For the test website, it looked like this after the changes were made:

Next, if you want to know how to force HTTPS to your website, please visit the following URL.