Sites

Managing sites

These commands work the same on every kind of site: WordPress, Laravel and plain PHP. Wherever a site goes, shop and shop.localhost both work.

Site names#

A name becomes the address, so it can hold lowercase letters, numbers and hyphens, and can't start or end with a hyphen. cove add client-2025 lives at https://client-2025.localhost and in ~/Cove/Sites/client-2025.localhost/.

Listing your sites#

cove list                      # every site, its type, WordPress version and PHP
cove list --totals             # with each site's size on disk
cove list --format=json        # for scripts

Finding a site#

cove path shop                 # ~/Cove/Sites/shop.localhost/public
cove url shop                  # https://shop.localhost
cd "$(cove path shop)"

cove path prints the folder that's served, so for a Laravel app, or an app from --from, it's the project's public/. cove url includes the port when Cove runs on alternative ports.

Cloning#

cove clone copies a site under a new name: its files, its database and any custom Caddy rules, with the stored address rewritten to the new one. A copy of a WordPress site keeps the same logins.

cove clone woo-template poc-acme

Set a site up once, with the plugins, users and content you always need, and stamp copies of it instead of building the same thing again. On APFS and btrfs the copy is copy-on-write, so it's quick and the two share disk space until one of them changes.

Renaming#

cove rename shop store

The folder and the database move to the new name, and so does the address stored inside: WordPress's URLs, including serialized ones, or a Laravel app's .env and Redis keys.

Deleting#

cove delete shop

Cove asks first, then removes the site's folder and the database Cove made for it (MariaDB or PostgreSQL), its snapshots, its custom Caddy rules and a Laravel app's Redis keys. A database you pointed wp-config.php at by hand stays, and so do zips in ~/Cove/Backups. --yes deletes without asking, and so does a script with no terminal to ask on. There's no --dry-run: an option it doesn't know stops it.

Want a way back? cove backup shop first. See Backups and moving.

More domains#

A site can answer on more names than its own, shop.test or every subdomain of it, with cove mappings. That, custom Caddy rules and standalone proxies are in HTTPS and domains.

Screenshots#

The dashboard shows a capture of each site's front page. You can take one yourself, of any page:

cove screenshot shop
cove screenshot shop --path=/checkout --out=checkout.png
cove screenshot shop --out=wide.png --width=1600 --height=900

It uses a Chrome, Chromium, Brave, Edge, Arc or Vivaldi already on your computer. cove screenshot --check says which one.

Recording a demo#

cove demo narrows Cove to the sites you name, so the rest stay off screen while you record. The dashboard, Adminer's database list and cove list show only those, and mail goes to a mailbox of its own meanwhile. Nothing on disk changes.

cove demo shop blog            # show only these two
cove demo                      # is it on, and for which sites?
cove demo off                  # everything back, your mail included

Something wrong or missing here? Open an issue ↗ Every command also explains itself: cove help <command>.