Change site name

I have set folder name in site folder, so I’m getting folder name except site domain.
my site folder name is erp but my domain is erp.mydomain.in
my system get the following url
http://erp:8000/api/method/twilio_integration.twilio_integration.api.whatsapp_message_status_callback is not a valid URL.

while it has to take
http://erp.mydomain.in/api/method/twilio_integration.twilio_integration.api.whatsapp_message_status_callback

is there any solution. Please suggest me.

Thank you

So which one do you want to do?

  1. To change folder name (regardless of the domain to use) you can use:
mv oldname newname

for complete steps you can search the forum. Some good posts exists.

  1. To be able to access site on certain domain (regardless of the site name):
bench setup add-domain --help

Hey thanks for the super helpful reply. I’m not sure how I missed that thread. I haven’t quite mastered the search function on here. I think I’ll pass with him this time around. If i want any further guideline we will contact you here https://discuss.frappe.io/t/change-site-name/88710/2-results.
Thanks

I totally agreed with you my problem is solved completely. Thankyou so much

@megha007
What I understand is that you created the new site with the name: “erp.mydomain.in”,
Then by renaming the same site path folder, you changed the site name to: “erp”…

What happened is that the name of the site folder has become different from the name of the domain… so it tells you that the link is invalid…
You need to make the site folder name and domain name the same.

However, I think the following can solve the problem.

Please, do the following:

  • Go to the site path folder, and in the site_config.json file, add this line:
    “host_name”: “erp.mydomain.in”

e.g.
{
“db_name”: “…”,
“db_password”: “…”,
“host_name”: “your_domain”,
}

1 Like

You don’t need to do this.
I even created site using generic name suffix .site and add 2 domains to each site, e.g myerp.com and myerp.net so it can be accessed from either domain.

note: you don’t even need to use the dot domain style for site name (folder). You can just use mysite1, mysite2, etc.

This is the purpose of the bench setup add-domain command.

1 Like