How do I remove domain.com name added to ERPNext sites And to add new-domain.com to ERPnext Sites?

Hi Everyone,

how do I remove domain name added to ERPNext sites?

I just added the domain.com to my site by using the bench command given below:

bench setup add-domain mydomain.com --site site1.local
bench config dns_multitenant on
bench setup nginx
sudo service nginx restart

Now I need to remove this domain.com and want to add new-domain.com.
Kindly help me to achieve the above or guide me.

Hi @netmanthan,

please try the below command

frappe@instance-2: bench drop-site --site1.local

Don’t use bench drop-site if you don’t want to delete the site.
If only removing domain name you can use bench setup remove-domain (see bench setup --help)

4 Likes

Thanks

  1. Removing or Deleting a domain name in frappe nginx configurations

bench setup remove-domain [domain-name] --site [site -name]

Once you have done this, regenerate the nginx configurations, restart nginx and reload nginx:
bench setup nginx
sudo service nginx restart
sudo service nginx reload

  1. Remove site from disk and database completely
    bench drop-site [domain-name] --root-user --root-password

Above i stated more in detail. but choice would be yours. :+1:

7 Likes

Great, It worked for me !