docs: public void removeSite(CmsObject cms, CmsSite site) throws CmsException {
  
          // check permissions
          if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) {
              // simple unit tests will have runlevel 1 and no CmsObject
              OpenCms.getRoleManager().checkRole(cms, CmsRole.DATABASE_MANAGER);
          }
  
          // un-freeze
          m_frozen = false;
  
          // create a new map containing all existing sites without the one to remove
          Map<CmsSiteMatcher, CmsSite> siteMatcherSites = new HashMap<CmsSiteMatcher, CmsSite>();
          List<CmsSiteMatcher> matchersForSite = site.getAllMatchers();
          for (Map.Entry<CmsSiteMatcher, CmsSite> entry : m_siteMatcherSites.entrySet()) {
              if (!(matchersForSite.contains(entry.getKey()))) {
                  // entry not the site itself nor an alias of the site nor the secure URL of the site, so add it
                  siteMatcherSites.put(entry.getKey(), entry.getValue());
              }
          }
          setSiteMatcherSites(siteMatcherSites);
  
          // remove the site from the map holding the site roots as keys and the sites as values
          Map<String, CmsSite> siteRootSites = new HashMap<String, CmsSite>(m_siteRootSites);
          siteRootSites.remove(site.getSiteRoot());
          m_siteRootSites = Collections.unmodifiableMap(siteRootSites);
  
          // re-initialize, will freeze the state when finished
          initialize(cms);
          OpenCms.writeConfiguration(CmsSitesConfiguration.class);
      }