How do I remove name added to ERPNext sites And to add to ERPnext Sites?

Hi Everyone,

how do I remove domain name added to ERPNext sites?

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

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

Now I need to remove this and want to add
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)



  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:


Great, It worked for me !