TOP
EN EL
Setting up an Umbraco project
12 October 2024 Published by Aristotelis Pitaridis
Tools used for this tutorial
Umbraco 14.2.0
Microsoft Visual Studio Community 2022 17.10.5
SHARE

Introduction

Umbraco is a popular, open-source CMS that provides a flexible framework for web development. This comprehensive guide will walk you through installing Umbraco Visual Studio templates, creating an Umbraco project using both Visual Studio and CLI methods, and completing the installation procedure by defining a username and password. Additionally, we'll cover the various database setups and how to configure them during the installation process.

Prerequisites

Ensure you have the following installed:

  • Visual Studio 2022 (or later)
  • .NET 8.0 SDK
  • SQL Server or SQL Server Express (if using SQL Server)
  • Node.js (for front-end development)

Step 1: Install Umbraco Visual Studio Templates

Open a terminal with administrative privileges and run the following command to install the Umbraco template:

dotnet new -i Umbraco.ProjectTemplates

Restart Visual Studio to ensure the new templates are available.

Step 2: Create an Umbraco Project

Using Visual Studio:

  1. Open Visual Studio and select "Create a new project."
  2. Choose "Umbraco Project" from the list of available templates and click "Next."
  3. Name your project and choose a location to save it.
  4. Select ".NET 8.0" as the framework and click "Create."

Using CLI Commands:

dotnet new umbraco -n MyUmbracoProject

Navigate to your project directory:

cd MyUmbracoProject

Restore the project dependencies:

dotnet restore

Step 3: Complete the Umbraco Installation

  1. Run the project (F5 in Visual Studio or dotnet run in the terminal).
  2. The Umbraco installation wizard will start in your browser.
  3. Follow the on-screen instructions and create an admin user by defining a name, a email address and password.

Step 4: Configure the Database

During the installation, you will be prompted to configure the database. Umbraco supports various databases. Here's how to configure each one:

  • SQL Server
    1. Select "SQL Server" from the database options.
    2. Enter your SQL Server connection details (server name, database name, username, and password).
    3. Test the connection and proceed.
  • SQL Server Express
    1. Select "SQL Server Express" and enter the default instance name (.\SQLEXPRESS).
    2. Provide the database name and credentials.
    3. Test the connection and proceed.
  • SQLite
    1. Select "SQLite" for a lightweight, file-based database.
    2. Umbraco will automatically create the necessary database file in the project directory.

Conclusion

Congratulations! You have successfully set up an Umbraco project using both Visual Studio and CLI methods. With your CMS configured and ready, explore Umbraco's features and customize your project to meet your web development needs.