If you want to learn how to change your WordPress database URLs from http to https then it sounds like you recently applied for a SSL certificate for your domain.
The fact that you searched for this topic means that you are aware of the changes. Just for the sake of explaining it to those that don’t know yet, getting your SSL certificate and moving your website from http to https is no longer up to debate. Since Google Chrome started labeling http addresses as not secure putting potential customers away from your ‘unprotected’ website, this is a must, especially for those running ecommerce websites or processing any delicate data.
Websites with SSL certificates are also favoured by Google over those that still use http protocol. In other words, SSL certification for your domain is a must these days.
Anyway, I’m assuming that you have already made the move and applied for your certificate. Unfortunately for you, the migration doesn’t happen automatically and apart from installing the actual certificate on your server, you need to update any old links in your wordpress database that still use http.
Better Search Replace http to https
The good part is that you are using WordPress and there is a fantastic plugin to do this for you. The plugin is called Better Search Replace.
How to install Better Search Replace plugin
Installation of the plugin is very simple and straightforward.
1. Install Better Search Replace plugin
Log in to your WordPress admin panel, go to your admin menu to the left, hover over or click on ‘Plugins’ and then ‘Add new’.
In the search bar type ‘better search replace’ and click on ‘Install Now’ button to install the plugin. After the plugin has installed, go and click ‘Activate’ button to activate it.
Once you have installed and activated the plugin, you will find it under ‘Tools’ > ‘Better Search Replace’ in the admin menu of the WordPress Admin panel.
2. Configure Better Search Replace plugin
You want the plugin to search for all http:// addresses in your database and replace these with https://.
Make sure you select all tables and it’s a good idea to run it first as a dry run. This way you can see what needs owerwritting before actually committing to replacing the links.
3. Run Search/Replace
Once you’ve done your dry run, the plugin will tell you how many entries needs replacing. Go ahead and untick ‘Run as dry run?’ tick box and click ‘Run Search/Replace’. Done.
While the free version of the plugin works great out of the box, every so often you might come across some issues therefore we recommend having a look at the PRO version of the plugin.
Better Search Replace Pro
Delicious Brains, the team behind Better Search Replace plugin, developed the PRO version of it as well. The plugin can be used to migrate your database to a new domain or server and Better Search Replace Pro can:
- back your database up to an SQL file,
- run a search/replace on the imported SQL file.
- issue a detailed report of what exactly was replaced.
This is a good idea if you’re not that techy yourself and don’t want to risk breaking your wordpress website.
Did you find it useful?
Did you find this tutorial useful? Or perhaps you came across a problem while updating your database from http to https? Let me know in the comments below.