Skip to content

Create a site

New site in the app, or:

Terminal window
rex site create myshop.rex --type wordpress
Option Values Default
Type wordpress, php, laravel wordpress
PHP any installed minor, 7.4–8.5 your configured default
Web server nginx, frankenphp, apache nginx (shared)
Database mysql, mariadb, postgres mysql
Multisite subdomain, subdirectory off
Blueprint any saved blueprint none

The CLI mirrors the dialog exactly, because it is the same code:

Terminal window
rex site create shop.rex \
--type wordpress \
--php 8.3 \
--server apache \
--db mariadb \
--multisite subdomain

A new site appears in the list the moment its setup starts, with an amber Setting up while the job runs — whoever started it: the dialog, rex site create, or an agent. The job’s own card sits above the list.

setup incomplete and a Retry button mean something different: the job died or was cancelled, and the site is half-made. Retry finishes it — rex site retry <domain> from a terminal — and Delete removes it. Through 0.8.10 the list could not tell the two apart — a row is saved when its job starts and marked finished only at the end — so every site read “setup incomplete”, with Retry beside it, for the whole of a perfectly healthy first install.

Choosing WordPress runs the install for you — core downloaded, database created, wp-config.php written, admin user made. When it finishes the site is a working WordPress at https://<domain>, and magic login opens wp-admin without a password.

Multisite is chosen at create time because WordPress bakes the choice into the database. Subdomain multisite gets a wildcard certificate so sub.myshop.rex works too.

--type laravel and --type php skip the WordPress install and give you a docroot with the right server config. For Laravel that means the docroot points at public/.

A new Laravel site always gets a database, and rexenv writes the connection into its .env — every key, whether the skeleton had it or not, so the skeleton’s own DB_CONNECTION=sqlite does not quietly win.

If Composer’s create-project fails, Retry empties the half-made skeleton and runs it again on the site’s current PHP — only when rexenv made the folder, and only when it is exactly a failed skeleton with no vendor/. Before, Retry read that skeleton as “already installed” and failed forever. The failure that found it: on PHP 8.0 or 8.1, Composer resolves Laravel 9 or 10, whose framework releases are all blocked by Packagist security advisories. The error names the blocked package and the fix — a newer PHP — and rexenv does not turn the block off.

Not a phpinfo() dump. rexenv generates an index.php that answers the questions a first page load is actually asked: which PHP version and web server are serving this, where the files are, and how to talk to a database. Both generated files are written once and never overwritten — a retry re-enters the same code with your edited page already on disk.

In the New Site dialog, the Database field is a real choice for blank PHP: MySQL, MariaDB, PostgreSQL (on a PHP that can reach it) or None, defaulting to MySQL.

  • An engine gets the site a database, a seeded starter_items table and a generated db.php that returns a ready PDO — and the generated page opens on those rows.
  • None skips the database, and with it the engine download — see Requirements for what a cold start pulls.

New sites are provisioned into rexenv’s Sites folder inside ~/Library/Application Support/dev.rexenv.rexenv/, unless you moved that folder in Settings.

To serve a project where it already is, use Link an existing folder instead — that path never copies your files.

The first site you create downloads the components it needs: a PHP version, nginx, the database engine, Caddy. Later sites reuse them and are quick. See Requirements for the total.