Creating a Site

Learn how to create a new Craft CMS site in Tun, either from scratch or using a blueprint.

Create a New Site from Scratch

To create a brand new Craft CMS site using the guided wizard:

  1. Click the "+" button in the Tun interface
  2. Select "Create a new site" from the modal
  3. Enter a name for your site
  4. Choose your PHP version (8.2, 8.3, or 8.4)
  5. Select your routing mode (hostname or localhost)
  6. Follow the installation wizard to create your admin account
  7. Click "Create"

Tun will automatically:

  • Create the site entry in the registry
  • Run composer create-project craftcms/craft in the project path
  • Set up a MySQL/MariaDB database
  • Generate Docker Compose configuration
  • Configure Nginx reverse proxy
  • Generate SSL/TLS certificates (if using hostname mode)
  • Start the container runtime
  • Install Craft CMS with your chosen version (3.x, 4.x, or 5.x)

Create from a Blueprint

If you have a saved blueprint, you can create a new site with all the blueprint's pre-configured settings:

  1. Click the "+" button
  2. Select "Create from a Blueprint"
  3. Choose your blueprint from the list
  4. Enter a name for the new site
  5. Click "Create"

The new site will inherit:

  • PHP version configuration
  • Database settings
  • Craft CMS version and configuration
  • Project structure and files
  • Environment variables
  • Installed plugins and modules (if included in blueprint)

This ensures consistent project setups across teams and maintains the same development environment configuration.

Site Lifecycle Management

Once a site is created, you can manage its lifecycle:

  • Start — Starts the container runtime and makes the site accessible
  • Stop — Stops the containers and frees resources
  • Restart — Restarts the site's containers
  • Delete — Removes the site from the registry (with confirmation)

Site Organisation

Tun provides several ways to organise your sites:

  • Grouping — Group sites for better organisation
  • Drag-and-drop reordering — Reorder sites in the sidebar
  • Renaming — Rename sites at any time
  • Custom hostnames — Configure custom hostnames for each site

Import an Existing Site from ZIP

You can import an existing Craft CMS site from a ZIP backup:

  1. Click the "+" button
  2. Select "Import from ZIP"
  3. Drag your ZIP file into the import area, or click to select it
  4. Tun will automatically validate and extract the backup

The import process will:

  • Validate the ZIP file structure
  • Extract the site files to the project path
  • Detect Craft CMS version from composer.lock
  • Configure the database connection
  • Set up the container runtime
  • Restore database if included in the backup

Make sure your ZIP file contains the complete Craft CMS installation, including the config/ directory and optionally the database backup.