Try ERPNext Buy Support Partners Foundation

How can I delete/remove a site?

How can I delete/remove a site?

Will be releasing a bench command in the bench.

You can drop the database and user for the site and remove the site from sites directory to remove a site manually.

Has a bench command been created to delete a site from a multitenant configuration?

1 Like

Sorry, it slipped from my list. I will release soon.

Steps:
1.First remove database of site.
2.Go to folder where you install Frappe setup.
3.Go to ‘Frappe Bench’ folder->‘Site’ folder->Delete required site

Geetanjali Shitole
New Indictrans Technologies Pvt. Ltd

1 Like

After removing database and site, remove user with site name from MySQL.user table to completely remove site.

Hello, is this done ?

Regards,

1 Like

By removing database of 1 site will affect other site’s database after deleting both sit and it’s database??
Because i have multiple sites.

Other site databases would not be affected. Also, the bench command to delete a site is
bench drop-site sitename

This will archive the site. You can then go to the archived sites folder in the frappe-bench directory and delete the site.

2 Likes

which one is the database that generated by ERPnext?

MariaDB [(none)]> SELECT User,Host FROM mysql.user;
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| debian-sys-maint | localhost |
| ea106b3e4781622f | localhost |
| root             | localhost |
+------------------+-----------+

Is it the ea10xxx?

updated: yes it was the ea10xx. I saw this database doesn’t exist anymore after calling bench drop-site. Very good designed software!

You can used bench drop-site sitename command.

Thanks.

1 Like

Additionally, if you encounter a backup failed error while trying to drop a site, use the below command to skip the backup step.

bench drop-site <site-name> --no-backup
2 Likes