Docs
Sites
Add, organize and manage sites in Benbow: domains, aliases, groups, per-site php.ini, archive, duplicate, remove and logs.
On this page
A site in Benbow is a folder served at its own local address with its own PHP version. Benbow serves the folder where it is: it never moves or changes your files.
Adding a site
The quickest way is to drag a folder into the site list in the app. For more options, click + in the toolbar and choose New Site. The sheet lets you start from:
| Start from | What happens |
|---|---|
| An existing folder | Benbow serves it. WordPress and Laravel projects are recognised (Laravel is served from public/) |
| A new empty folder | Benbow creates the folder for you |
| WordPress | A fresh WordPress install with its own database |
| Laravel | A new Laravel project with .env ready |
In the same sheet you choose the name, domain, aliases, PHP version, group, a database (none, new or existing) and, in a collapsed section, the site’s own PHP settings. Benbow creates everything in one step. If any part fails, it undoes all of it, including a folder it created.
From the terminal:
benbow site add shop --php 8.4 --path ~/Sites/shop
benbow site add shop --path ~/Sites/shop --create-folder --group Clients/Acme \
--aliases www.shop.localhost --database new --ini memory_limit=1G
--database new creates a database with its own user. --database <name> links an existing one. New WordPress and Laravel projects have their own commands, benbow wordpress and benbow laravel, described in WordPress and Laravel. Databases are covered in Databases.
Changing a site
benbow site set shop --php 8.2
benbow site set shop --path ~/Work/shop
benbow site set shop --domain shop.test
benbow site set shop --title "Shop for Acme"
Changes apply at once while Benbow is running. If applying fails, the previous settings come back. A title is only a label for the list: the name and address stay the same. In the app, use Edit Title in the context menu, or the pencil next to the title in the site detail.
Domains
Every site gets <name>.localhost by default, which needs no setup. You can also use .test or .local names:
| Suffix | Example | Setup |
|---|---|---|
.localhost |
shop.localhost |
None |
.test |
shop.benbow.test |
benbow domains enable test, one administrator authorization |
.local |
shop.local |
benbow domains enable local, one administrator authorization |
.local is a MAMP compatibility mode, so imported MAMP sites can keep their names. For new sites, .localhost and .test are faster and need less. Other suffixes and public domains are refused. In the app, these options are in Settings → Domains. Details are in HTTPS and domains.
Aliases
Aliases are extra domains served by the same site, with the same rules as the main domain. Each domain or alias belongs to one site only, and a site can have up to 20.
benbow site set shop --aliases www.shop.localhost,shop.test
benbow site set shop --aliases "" # remove all aliases
Groups
Groups organize the site list in folders, nested up to 16 levels. They only change the list, never how a site is served.
benbow group add Clients/Acme # creates missing levels too
benbow site set shop --group Clients/Acme
benbow group rename Clients/Acme "Acme Corp"
benbow group move Clients/Acme / # / is the top level
benbow group remove Clients # its sites and groups move up one level
In the app, drag a row between two others to reorder it, or onto a group to move it inside. Move To in the context menu does the same. Right-click a group for New Site Here, New Group Inside, Turn All Sites On/Off, Rename and Remove.
Turn a whole group on or off
The switch on a group row turns off every site inside it, subgroups included. From the terminal:
benbow group disable Clients
benbow group enable Clients/Acme # archived sites stay off
Per-site php.ini
A site can override the php.ini values of its PHP version, for example a higher memory limit for one heavy site. In the app: site detail, Advanced, PHP settings.
benbow site php shop # effective values and where each comes from
benbow site php shop memory_limit=1G
benbow site php shop memory_limit= # back to the PHP version's value
See PHP for the available settings.
Turning off, archiving and duplicating
The switch next to each site stops serving it while keeping it in the list (benbow site disable shop, then benbow site enable shop).
Archiving puts a site away: it is off and listed apart, under “Archived” in the app (Archive is in the site’s Advanced section). Its folder, database, aliases and settings are kept. It cannot be turned on until you unarchive it.
benbow site archive shop
benbow site unarchive shop
To duplicate a site, use Duplicate in its context menu in the app.
Removing a site
benbow site remove shop
benbow site remove shop --drop-database --yes
Removing a site never touches its folder. Its database stays unless you add --drop-database. In the app, Remove is in the site’s Advanced section.
Logs
Each site has its own request log and PHP error log, with only that site’s errors, warnings and notices. In the app, click Logs in the site detail. The window refreshes every 2 seconds.
benbow site logs shop # requests
benbow site logs shop --php -n 100 # last 100 PHP errors
benbow site logs shop --clear
Logs live in Benbow’s folder, not in your project. Removing a site deletes its logs.