Acquia Dev Desktop 2
Delete a site from a multisite installation
We at Tojio use the Acquia DevDesktop in version 2 to develop Drupal websites. Packed with everything you need for Drupal development (including Drush and a completely preconfigured Drupal stack) and seamless integration with the Acquia Cloud, this is a very good tool for Drupalistas, even if it is still a beta version.
One disadvantage of the software came to light today, however: there is no easy way in the user interface to delete a single site from a multisite installation. However, since developers are not afraid to pull the strings behind the interface, I will describe the solution to this problem here.
There is no provision for deleting pages?
It's actually absurd, you can create new sites within a multisite installation in no time at all and very conveniently. But you can no longer delete them...? There is no option for this in the user interface, only the entire Drupal installation with all sites, files and databases can be deleted at once.
When creating new sites in a multisite installation, the DevDesktop performs the following steps:
- Create an entry in /etc/hosts so that the domain used points to the local computer
- create a directory in the sites folder and an alias site.local
- create a database (and import one if necessary)
- create a local settings file under ~/.acquia/DevDesktop/DrupalSettings/devdesktop_{site_url}_local.inc
- create a Drush alias in the file ~/.acquia/DevDesktop/Drush/loc.aliases.drushrc.php
You would think it would be enough to undo these steps manually to delete the site - and it almost is. However, the deleted site is still displayed in the Control Panel under Multisites. And what is even more annoying: if you ever try to create a site with the same URL again, the DevDesktop aborts with the error message that a site with this hostname already exists.
The solution: manipulate the internal data of the DevDesktop
To delete the site completely from the Control Panel, the following steps are necessary:
- switch to the Programs > Dev Desktop folder
- [CTRL]-click on Acquia Dev Desktop and select "Show package contents"
- Go to Contents > MacOS
- Open the file "datamodel.xml", delete the corresponding section
- Restart Acquia DevDesktop I have posted the original solution (in English) here in the DevDesktop forum of Acquia.