Web Template and Multi-server farm

Today I came across a weird issue when trying to provision a custom web template through Central Administration. I had created the onet file and things worked fine in my development environment. However when switching to the test environment, selecting my template from the Central Administration ‘Create Site Collection’ page and hitting ‘Create Site’ resulted in errors: Feature with ID {guid} is not installed in this farm.

That’s weird, right? I am sure I have deployed my solutions to the Web Application that the site collection was to be created at. Turns out, if you have a multi-server farm and your Application Server is not hosting the Web Applications – deploying a solution to a specific Web Application does not install the features for the Application Server thus – it cannot find them.

The solution is simple: When creating the site collection from the Central Administration, pick the ‘Select a template later’ option. After the site has been created – browse to it and select your custom template. Since you are now on the site, the code will be executed by the Web Frontend Server which can find your installed solutions no problem. Gotcha!