Skip to content

Link an existing folder

If a project already exists on your disk — in ~/Projects, on an external drive, anywhere — rexenv can serve it in place.

Terminal window
rex site create myapp.rex --path ~/Projects/myapp

In the app, New site → link an existing folder and pick it.

That is the whole reason this feature exists. A local environment that relocates your work into its own directory makes itself hard to leave, and makes “try it on my real project” a decision instead of an experiment.

Everything a provisioned site gets: a domain, a certificate, real HTTPS, a PHP version you can switch, a web server you can override, logs, a terminal in the docroot, and per-site environment variables.

  • The docroot. If the project serves from a subdirectory — public/ for Laravel, web/ for some setups — point rexenv at that, not at the repository root.
  • The database. A linked site does not get one automatically, because your project probably already has connection settings. Create one and point your config at it, or keep using whatever it currently talks to.
  • .htaccess. If the project relies on it, choose the Apache per-site override — nginx does not read .htaccess files, and no local environment can make it.

Coming from Valet or Herd? Those have a dedicated import flow that finds every site at once, copies databases, and can rewrite connection config with a diff and a backup first — all reversible, with the source environment strictly read-only. See Migrating from Valet or Herd.