Tags

, , , ,

Hi Friends,

I am really happy to see many developers starting to learn Sitecore development.

One of the challenges I have noted with them is Failed Sitecore installation when installing on Local.

Sometimes, due to company policy or project requirements, the Sitecore site must be installed on the predefined URL. now if you have a failed installation, still there are a few DBs, certificates, sites, folders, etc. already created. You need to clean up that before you run the installation again. Removing the folder and IIS Sites are easy. But things get complicated with the Certificates, and Windows Services.

For our development project, we had to use the PowerShell scripts for 9.3 installations, and the amount of this issue was in large quantity. I noted down some steps to clean up the installation.

I have followed the below steps to remove the failed installation of Sitecore 9.3.

Update: 7/18/2023 – Just after publishing this blog, I came across a failed installation of 10.3. I followed the steps mentioned and updated with anything missing or any step can be changed with a simpler one like deleting the Certificates.

Overview: Clean your workspace

  • Delete Databases
  • Delete Services
  • Delete IIS sites, AppPools, certificates from IIS
  • Delete the Site folder in wwwroot

Detailed steps to clean

Delete Databases

  • Remove your databases that are related to the installation if exist.
  • Select the Database in SQL Management Studio. Delete the Database.
    • Make sure to check “Close existing connections”. Else you won’t be able to delete the Database

Delete Services

  • Open your Windows Services Manager (you can type in your Windows search bar “services” and select the services app)
    You should be able to see those services : (All services start with the name “Sitecore”)
    • Sitecore Marketing Automation Engine – nameOfYourInstallation(might be one of your previous installs)
    • Sitecore Processing Engine – nameOfYourInstallation
    • Sitecore XConnect Search Indexer – nameOfYourInstallation.
  • Right-click on the service and click on Properties. On the tab, you will see the service name. Copy that in a text file. Write those down. Keep your service app open.
  • Using NSSM (probably installed already from some of your previous installed, if not, can use chocolatey ( https://chocolatey.org/packages/NSSM )
  • Remove those services.
    • in a cmd : nssm remove serviceName

Paste your service name after remove

nssm remove sc93.xconnect-MarketingAutomationService
nssm remove  sc93.xconnect-ProcessingEngineService
nssm remove  sc93.xconnect-IndexWorker

Or – To remove service without NSSM, Use PowerShell Details here “https://darjimaulik.wordpress.com/2023/07/18/remove-sitecore-services-with-powershell/

Delete Sites & App Pool & Certificates from IIS

Open IIS

  • Go to Sites, select your Sitecore Site,
    • Click Basic Settings on the right side navigation. Note down the Application pool name.
    • Delete the site.
    • Note down Application pools for Xconnect and Identity sites and then delete the sites.
  • Go to Application Pools
    • Select the Application Pool noted down in the above step. IMP: Confirm the Application Pool is not used on another website. If not used, you can safely delete the Application Pool.
    • You need to delete the Application pools for dev, Xconnect, and identity sites as well.
  • Go to the first Node in IIS –> Your machine name.
    • Open “Server Certificates”
    • Delete the Certificates used by the sites.
  • Or To Remove your certificates (using certlm -> you can type in your Windows search bar “cert” and then you should be able to pick “Manage computer Certificate”.
    • On the left sidebar, Click on Personal > Certificates.
    • Remove your installation-related certificates
      • nameOfYourInstallation.identityserver
      • nameOfYourInstallation.sc
      • nameOfYourInstallation.xconnect

When it’s done, restart your computer (some services and in a state of removal, that needs a restart to be completely removed)

Try to install it with SIA again.