Create an Orchard Core CMS Website

Orchard Core CMS Tutorials

I was asked how to create an Orchard Core CMS Website the other day while attending a local developer group meeting so I thought I would write a quick Orchard Core CMS Tutorial on just how crazy simple it is now. You don't need to be an Orchard Core Developer or even particulary knowledgeable about .NET Core or .NET Core Development just to create and run an Orchard Core CMS Website on your PC or Mac. You do need to make sure you have the .NET Core 2.2 SDK installed. From there you just need to install and run the code generation templates to make it really simple to create your first Orchard Core CMS Website.

Orchard Core Code Generation Templates

Orchard Core has code generation templates that allows one to easily create various Orchard Core Projects using the .NET Core CLI. These templates come in two flavors at this time, one for using stable code and one for using the bleeding-edge development code. If you're not an Orchard Core Developer, I recommend the stable code. The templates using the stable code can be installed with a single command.

dotnet new -i OrchardCore.ProjectTemplates::1.0.0-beta3-*

After you run this command, you can type dotnet new to see a list of all the templates available to the .NET Core CLI. You will notice specific code generation templates for creating an Orchard Core CMS Website, Orchard Core Modules, Orchard Core Theme, and an Orchard Core MVC Web App. You can use Orchard Core not only for creating a CMS Web App, but also for developing modular .NET Core MVC web applications, so look closely at the template commands to be sure you're running the correct ones.

Orchard Core Code Generation Templates

Create an Orchard Core CMS Website

With the code generation templates installed, creating an Orchard Core CMS Website is now as simple as running a single .NET Core CLI command using the corresponding code generation template.

dotnet new occms -n Test

When you run the command it should create an Orchard Core CMS Website successfully and even respond accordingly.

The template "Orchard Core Cms Web App" was created successfully.

Now you can change into the directory and run the project. It will do a restore, build, and then run the website.

cd test
dotnet run

Hosting environment: Development
Content root path: .../Test
Now listening on: https://localhost:5001
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

The first time you run an Orchard Core CMS Website you will see the setup screen that asks you information abouth the website, the setup recipe you wish to use to create the website, and credentials for the super user account.

Create Orchard Core CMS Website

If this is your first time creating an Orchard Core CMS Website, I recommend choosing a setup recipe that actually creates something for you to see and play with, like The Agency Theme's Setup Recipe or The Blog Theme's Setup Recipe. Here is an example of what you will see after choosing Agency.

Develop Orchard Core CMS Website

Congratulations! You created your first Orchard Core CMS Website!

I plan to expand on this beginner tutorial later. In the meantime, you can read some of my other Orchard Core Tutorials.