Migrating from http to https

Other answer to this question is the direct way to corrupt database if it contains links in serialized data (and most of modern themes do this).

WordPress keeps all internal links as absolute. (If your main page contains link to let say contacts page, in database it is stored as http://example.com/contacts.php). If such a links are used in buttons of theme, they will be inside of serialized data and direct replacement in database will corrupt your site.

What you need is to use special tools like Search and Replace or even better, excellent plugin for moving sites – Duplicator.

These tools will help you to move your site correctly.