Clone erpnext domain to old ip


I clone the erpnext and installed in new server.
although i changed domain to point to new server ip, but failed to connect.
i pinged my domain, and find domain still pointed to old ip.

can any friend provide some solution?

Generally speaking, DNS providers take a little while to propagate changes, so you may need to wait a bit. But you should also double check that your DNS settings are correct.

Also for the future, this question isn’t related to frappe/erpnext, and shouldn’t be posted here.

1 Like

That is not entirely true. For me, even AFTER the DNS pointer settle, it requires editing the site_config.json file to get things back on track. So, the discussion DOES in fact belong here.

I have a full VPS server image that I restore to new servers all the time in order to preserve my customized version of ERPNext.

Even with those full server clones, the system will not work by just re-directing the DNS pointers to the new server ip address. It requires a little work to be done on the new server for it to be recognized.

I have a series of steps that I use to get my servers to be recognized and working again after a fresh clone restore. I do not profess to understand why these steps work for me, but I do know that unless I follow them, I will always get the “Sorry come back later” screen when trying to access them. There may be a better way to do this, but for me, this works. My steps are as follows:

  • edit site_config.json to remove everything except the db name, db password, and encryption key strings. (make sure to delete the trailing comma after the last line and leave the last brace character)

  • then execute the following commands from frappe-bench directory:

    bench config dns_multitenant off
    bench setup nginx
    sudo service nginx restart

  • At this point you shoudl be able to access the site by entering the ip address into the browser address bar. After you have confirmed this, then execute the remaining commands from the /frappe-bench directory:

    bench config dns_multitenant on
    bench setup add-domain --site site1.local []
    bench setup nginx
    sudo service nginx restart
    bench --site site1.local enable-scheduler

  • At this point your site should now work with the URL you assigned (or re-assigned) to the server. After you verify this you can go about adding your security certificate by your favorite method.

Again… this works for me. Your mileage may vary! :sunglasses:



Right, except it seems that this isn’t his issue, as he said that the domain still routes to his old server, despite him having changed it. So this doesn’t really have anything to do with frappe, it’s an issue on the DNS providers side.

But thanks for the steps, these may still come in handy at some point (once I find a reason to migrate)!