The standard procedure.
TAKE A BACKUP FIRST
A database search and replace cannot be undone.
THE METHOD
- Install Better Search Replace.
- Tools > Better Search Replace.
- Search for: http://yourdomain.com Replace with: https://yourdomain.com
- Select all tables.
- Tick "Run as dry run" and run it. Note how many changes it reports.
- Untick dry run and run it for real.
WHY THIS PLUGIN
WordPress stores some data in a serialised format that includes string lengths. A raw SQL replace corrupts it. This plugin handles serialisation correctly.
Never run a manual SQL search and replace on a WordPress database.
AFTERWARDS
Clear all caches: caching plugin, Cloudflare, browser
Re-save permalinks Check the console on several pages
WHAT REMAINS
Anything the console still reports is in theme files, plugin settings stored oddly, or external resources. Handle those individually.
DO NOT REPLACE GLOBALLY
Replace only your own domain. Replacing http:// everywhere breaks links to external sites.