Package Script Writer

Umbraco friend Paul Seal has made the best way to quickly spin up a new Umbraco install with his Package Script Writer.

I might be an edge case but I create a new Umbraco install many times a week to do some quick prototyping and to make sure that what I think should work in a clean Umbraco install actually works. My absolute favorite tool to quickly create a new install is Package Script Writer (PSW) by Umbraco MVP Paul Seal.

As said, I might be a bit of a special case, but I'll get to why you should care in a bit.

Package Script Writer does what it says in the name: given a few inputs, it creates a script that works in PowerShell, Windows command line and Linux/Mac terminal to create a new Umbraco site, run the installer (unattended) and then run the website. It's very quick to spin up a clean site with a simple copy, paste, enter.

Screenshot of a command generated with Package Script Writer, including a "Copy Script" button to be able to quickly opy and paste the command in a terminal window

The additional beauty of PWS is that the generated script, once you're happy with it can be shared by just sending someone the URL. It will include any NuGet packages you've selected, the username and password for the backoffice (careful to not send people secrets you don't want to leak!) database type and so on. For example, this is my favorite, bookmarked script: the latest version of Umbraco, with The Starter Kit installed, using SQLite - it will work on any machine (Windows, Linux, Mac, Raspberry Pi) so I can quickly test anywhere I need.

Due to the nature of my work with the Umbraco CMS issue tracker, pull requests and Discord questions I am often in need of a clean install to verify what I'm telling people.

Why should you care?

But is PSW just useful to people like me? I would hope not! It happens so often that questions lead to the answer: "hmmm, works on my machine" only to find out after a lot of back and forth that it was a configuration difference, some code interfering, maybe some files that were missing (or added files that were in the way). I can highly recommend this when you are debugging as well and are thinking to yourself: "this SHOULD work, right?"

My favorite rubber-ducking tool before pinging people is to just spin up a new install and try out a very minimal example of the code that's not working for me. Yes, I used the word "just" here, which I'm not supposed to, but.. PSW just makes it too easy.

Remember, when debugging a problem, trust nothing and nobody, especially yourself (trust me, I should take my own advice here more often).