Migrating from MAMP
How to migrate from MAMP to Herd
If you’re currently using MAMP or MAMP Pro for your local PHP development and want to switch to Herd, this guide will help you migrate your setup smoothly. Herd provides several advantages over MAMP, including:
- Deeply Integrated Laravel Support
- Advanced Web Development Debugging Tools
- Database Instance Management for MySQL, PostgreSQL, MongoDB and redis
- Additional Service Management for TypeSense, MeiliSearch, MinIO and Laravel Reverb
- First Party Laravel Forge Integration
- Native Xdebug Integration and Detection
Before You Begin
Before starting the migration process, make sure you have:
- A list of all your active MAMP sites
- Database exports of all your databases
- Installed Herd
Exporting MAMP Databases
The first step is to export all your databases from MAMP. You can do this using phpMyAdmin that ships with MAMP or via the command line.
Via phpMyAdmin
- Open MAMP and start your servers
- Navigate to phpMyAdmin (usually at http://localhost:8888/phpMyAdmin)
- Select each database you want to export
- Click “Export” in the top menu
- Choose “Quick” export method and “SQL” format
- Click “Go” to download the SQL file
Via Command Line
If you prefer using the command line, you can use the MySQL executable that ships with MAMP:
Setting Up Databases in Herd
After exporting your databases, you’ll need to set them up in Herd. You have several options:
Option 1: Herd Pro Services (Recommended)
If you’re using Herd Pro, you can install MySQL directly from the Services panel:
- Open Herd settings
- Go to the Services tab
- Click the + button and select MySQL
- Import your database dumps using TablePlus or AdminerEvo directly from the service panel
Option 2: Standalone MySQL
If you’re using the free version of Herd, you can:
- Install MySQL separately via Homebrew or download it from mysql.com
- Import your databases using the mysql command line tool:
Migrating Sites
Step 1: Document Current Sites
First, make a list of your current MAMP sites and their document roots. In MAMP Pro, you can find these in the Hosts section of the application.
Step 2: Set Up Herd Directory
Herd uses a central directory for serving sites. By default, this is ~/Herd
. You can also add additional parked paths in the settings.
Step 3: Move Your Projects
- Create your desired directory structure in your Herd directory
- Move or copy your project files to this new location
- Access your sites via their new
.test
domains automatically
For example, if your site was at:
Move it to:
It will then be accessible at http://mysite.test
Updating Configuration
PHP Version
MAMP and Herd handle PHP versions differently. In Herd, you can:
- Set a global PHP version via the menu bar or CLI:
- Set per-site PHP versions either through the Site Manager or CLI:
Database Connections
Update your database configuration in your applications. For Laravel applications, modify your .env
file:
Virtual Hosts
Unlike MAMP, Herd doesn’t require manual virtual host configuration. Simply placing your project in a parked directory makes it accessible via its .test
domain. If you need custom domains, you can use the link
command:
SSL Certificates
If you were using SSL certificates in MAMP, you can secure your sites in Herd with a single command:
This automatically generates and installs a trusted SSL certificate for your local domain.
PHP Extensions
Herd includes most common PHP extensions by default. If you need additional extensions, check the PHP Extensions documentation for installation instructions.
Mail Testing
If you were using MAMP’s built-in mail catching, Herd Pro offers an improved mail testing feature that captures all outgoing emails and provides a modern interface for inspection.
Troubleshooting
Common Issues
-
Database Connection Issues: Ensure you’re using the correct port for your database connection. If you’re using Herd Pro’s MySQL service, check the port in the Services panel.
-
PHP Version Mismatch: If your application requires a specific PHP version, use
herd isolate
to set the correct version for that project. -
Missing Extensions: Check the PHP Extensions documentation if you need to install additional extensions.
For more help, consult the troubleshooting guide or reach out to the community support.
Final Steps
- Test all your migrated sites and ensure they work as expected
- Verify database connections and functionality
- Test any special PHP configurations or requirements
- Once everything is working, you can uninstall MAMP
After completing this migration, you’ll have a faster, more modern development environment that’s easier to maintain and better integrated with macOS.