0

We are planning to migrate one of our sites since it has been hacked and recovered. We want it to migrate to a new domain (account but same hosting). Now my problem is the site we want to migrate to a new domain is already on https and the new domain is still http since it's newly bought.

When I try to connect my database to the new domain do I need to set the home and site url to https://newdomain in the wp_options in my database to match the old domain? or just http://?

I'm afraid that it may cause an error and im new to wordpress development that is why im anxious. I would appreciate if u can help me out.

2
  • You should get HTTPS/TLS/SSL enabled on the new domain. Not because WP demands it, but because it's the responsible thing to do, and to go back to https would be insecure, and reduce your performance and SEO. Nothing good comes of going https -> http
    – Tom J Nowell
    Aug 10, 2020 at 14:50
  • Hi! Yeah that's what I was initially planning but halted the process since I'm a bit confused. I used really simple ssl plugin to force my old site from http to https and was thinking to do the same for the new domain. But since the backup of my site that I am planning to migrate to the new domain contains the same plugin and has 301 redirect enabled. Iwas thinking if it will just override the plugin that makes the new domain https. Im sorry for the naive questions, thank u so much.
    – rusal
    Aug 11, 2020 at 0:59

1 Answer 1

0

The values in wp_options should match exactly the URL you want to use to access the site.

Without any specific configuration to do it, Wordpress doesn't care if it's https or http as long as the settings match how you access the site.

So you should change it to http until you get your SSL on your new site, and then change all the settings to https once https is working on your new site.

EDIT:

As per @TomJNowell's comment, this is not a great situation to be in because Wordpress may still have URL's that contain the 'old' https value fixed in post content, so these will not work until you get your https working.

You can change those back to http if you want. How to do this is documented many places online, for example there are some sensible instructions here, but it does seem much easier just to get https working rather than do all that work twice.

4
  • 1
    They'll need to do a search replace to change all their links from the old to the new domains, a simple naive SQL query could destroy their database though, you should mention how to do that in the answer
    – Tom J Nowell
    Aug 10, 2020 at 14:51
  • @TomJNowell Gosh good point, thanks!
    – mozboz
    Aug 10, 2020 at 14:53
  • Will just enable https to the new domain. Thank u for this @mozboz
    – rusal
    Aug 11, 2020 at 1:01
  • Hi! Yeah that's what I was initially planning but halted the process since I'm a bit confused. I used really simple ssl plugin to force my old site from http to https and was thinking to do the same for the new domain. But since the backup of my site that I am planning to migrate to the new domain contains the same plugin and has 301 redirect enabled. Iwas thinking if it will just override the plugin that makes the new domain https. Im sorry for the naive questions, thank u so much.
    – rusal
    Aug 11, 2020 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.