Radicle comes with configuration for two local development setups out of the box:
Laravel Valet also supports Radicle sites with no config required.
These tools aren't a requirement to use Radicle. Any local development tool can be used with as long as you set your document root to the public directory. You will also need to:
- Run
npm install && npm run build - Run
composer install - Copy
.env.exampleto.envand update the environment variables
To use Lando with Radicle:
- Run
npm install && npm run build - Run
lando start - Visit
https://radicle.lndo.site/ - Run
lando devto start the Vite dev server
You can run lando login to generate a passwordless wp-admin login URL (WordPress must first be installed).
If you need to configure Vite for Lando development, open vite.config.js and add the following to the top of defineConfig:
server: {
host: "0.0.0.0",
port: 5173,
strictPort: true,
cors: {
origin: "https://radicle.lndo.site",
credentials: true,
},
hmr: {
host: "localhost",
protocol: "ws",
},
},Run php .radicle-setup/trellis.php to setup Trellis and apply the necessary modifications for Radicle. After Trellis has been setup you can start the VM:
$ cd trellis/
$ trellis vm startRun npm install && npm run build before visiting your site at http://example.test/.
You can remove the .radicle-setup/ directory after you've ran the Trellis script, or if you aren't planning to use Trellis.
Make sure to commit the changes to the repo as there will now be a trellis/ folder.