Migrating from Laragon
Migrating from Laragon to Herd
While Laragon and Herd are both development environments for PHP and Laravel, they have some key differences in their approach. This guide helps you migrate your existing Laragon setup to Herd while maintaining your productivity and existing projects.
Key Differences
Here are the main differences between Laragon and Herd:
- Herd is tailored to Laravel, mirroring standard deployment setups closely
- Herd manages PHP versions automatically
- Herd comes with nvm for Node.js version management
- Herd (Pro) ships with debugging tools and a common services
Before You Start
Before migrating to Herd, make sure to:
- Document your current Laragon setup (PHP versions, database names, etc.)
- Export any important databases
- Shutdown Laragon
- Install Herd
Directory Structure
While Laragon keeps all projects in its www
directory by default, Herd uses the concept of parked paths. By default, Herd creates and uses %USERPROFILE%\Herd
as the parked directory.
You have two options for your existing projects:
- Move them to the Herd directory
- Add your Laragon
www
directory as a parked path in Herd
Option 1: Moving Projects
- Copy your projects from the Laragon
www
directory to%USERPROFILE%\Herd
- Each project will automatically be available via
http://directory-name.test
Option 2: Adding Laragon Directory
- Open Herd settings
- Go to “General” settings
- Add your Laragon
www
directory to the parked paths - All projects in that directory will be available via
http://directory-name.test
PHP Versions
Herd manages PHP versions differently than Laragon. Instead of downloading PHP versions manually, Herd provides an easy interface to install and manage PHP versions:
- Open Herd settings
- Go to “PHP” settings
- Install the PHP versions you need
- Isolate projects to specific PHP versions if needed
Database Migration
MySQL
If you’re using MySQL databases in Laragon, you’ll need to:
- Export your databases from Laragon’s MySQL
- Set up MySQL in Herd (via Herd Pro or dbngin)
- Import your databases into the new MySQL instance
Exporting from Laragon
Importing to Herd
If you’re using Herd Pro:
- Install MySQL via the Services tab or via dbngin
- Use TablePlus or AdminerEvo to import your databases
- Update your projects’
.env
files with the new database credentials:
PostgreSQL
If you’re using PostgreSQL, the process is similar:
- Export your databases from Laragon’s PostgreSQL
- Set up PostgreSQL in Herd Pro or standalone
- Import your databases
- Update your connection settings
SSL Certificates
If you’re using SSL certificates in Laragon:
- Note which sites need HTTPS
- Use the secure sites feature in Herd
- Run
herd secure
for each site needing HTTPS
Node.js and NPM
Herd includes nvm for Node.js version management:
- Install needed Node.js versions via Herd settings
- Optionally isolate projects to specific Node.js versions
Mail Testing
If you used Laragon’s built-in mail features:
- Configure Herd’s mail service (Herd Pro)
- Update your
.env
files with the new mail settings
Troubleshooting
If you encounter issues during migration:
- Check the common issues section
- Verify file permissions
- Check the Herd logs
- Make sure old Laragon services aren’t running
Running Both Side by Side
During migration, you can run both Herd and Laragon, but:
- Don’t run them simultaneously
- Stop all services in one before starting the other
- Watch for port conflicts, especially with databases
Final Steps
After migrating:
- Test all your applications thoroughly
- Update documentation and deployment scripts
- Consider uninstalling Laragon once everything works
- Set up Herd Pro features like Dumps and Log Viewer
For detailed information about specific features or troubleshooting, consult the relevant sections of the Herd documentation.