Migrate from XAMPP
Switch from XAMPP to DAMP's modern stack
Switch from XAMPP to DAMP and get DevContainers, modern PHP versions, and HTTPS by default.
Why Migrate?
| Feature | XAMPP | DAMP |
|---|---|---|
| DevContainers | ❌ No | ✅ Full VS Code integration |
| Web Server | Apache | Caddy (modern, HTTPS) |
| PHP Versions | ⚠️ One at a time | ✅ Multiple simultaneous |
| HTTPS | ⚠️ Manual | ✅ Automatic |
Keep Your Code
DAMP adds DevContainer files - your existing PHP/Laravel projects stay intact!
Migration Process
Stop XAMPP Services
Stop all services to free ports:
- Open XAMPP Control Panel
- Stop Apache
- Stop MySQL
- Stop any other running services
- Exit XAMPP Control Panel
Export XAMPP Database
Export your database data:
- Open browser:
http://localhost/phpmyadmin - Select your database
- Click "Export" tab
- Choose "Quick" method
- Click "Go" to download
.sqlfile
Open DAMP
Launch DAMP and click "Add Site" button.
Select "Existing Project"
Choose the Existing Project option.
Configure Site
Fill in the details:
| Field | Value | Example |
|---|---|---|
| Name | Your site name | my-xampp-site |
| Path | Your XAMPP project | C:\xampp\htdocs\my-project |
| PHP Version | Upgrade recommended | 8.3 |
PHP Version
Consider upgrading to PHP 8.3! DAMP supports PHP 7.4, 8.0, 8.1, 8.2, and 8.3.
Install Services
Install services your project needs:
| Service | Install? | XAMPP Equivalent |
|---|---|---|
| MySQL | ✅ Required | MySQL |
| PostgreSQL | ✅ If needed | N/A |
| Redis | ✅ Recommended | N/A |
| Mailpit | ✅ Recommended | Mercury (mail) |
Go to Services page → Click "Install" for each service.
Import Database
Import your exported data to DAMP:
# Inside VS Code DevContainer terminal
mysql -h damp-mysql -u damp -pdamp damp < /path/to/backup.sqlOr use phpMyAdmin-like tools:
- Install DBeaver or TablePlus
- Connect to
localhost:<port>(find port in DAMP) - Import
.sqlfile
Update Configuration
Open project in VS Code DevContainer and update database config:
Laravel .env:
# Old XAMPP config
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_database
DB_USERNAME=root
DB_PASSWORD=
# New DAMP config
DB_CONNECTION=mysql
DB_HOST=damp-mysql
DB_PORT=3306
DB_DATABASE=damp
DB_USERNAME=damp
DB_PASSWORD=dampPlain PHP:
// Old XAMPP
$conn = new mysqli('localhost', 'root', '', 'my_database');
// New DAMP
$conn = new mysqli('damp-mysql', 'damp', 'damp', 'damp');WordPress wp-config.php:
// Old XAMPP
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
// New DAMP
define('DB_HOST', 'damp-mysql');
define('DB_USER', 'damp');
define('DB_PASSWORD', 'damp');Update URLs (If Needed)
If your project has hardcoded URLs:
XAMPP:
http://localhost/my-projectDAMP:
https://my-project.localUpdate in database or config files.
Test Your Site
- Open in VS Code: Click "Open in VS Code" in DAMP
- Reopen in Container when prompted
- Browse to
https://my-project.local - Install SSL certificate from DAMP
What Changed
File Structure
DAMP adds DevContainer files:
my-project/
├── .devcontainer/ ← Added by DAMP
│ ├── devcontainer.json
│ ├── Dockerfile
│ ├── php.ini ← Like XAMPP's php.ini
│ └── xdebug.ini ← Built-in debugging!
├── .vscode/ ← Added by DAMP
│ ├── launch.json
│ └── settings.json
└── [Your existing XAMPP files remain]Web Server
XAMPP: Apache with .htaccess files
DAMP: Caddy with automatic HTTPS
Caddy vs Apache
Caddy automatically handles most Apache .htaccess rules. For Laravel, routing works out of the box!
Service Access
XAMPP:
$host = 'localhost'; // or 127.0.0.1DAMP:
$host = 'damp-mysql'; // Container nameDomain Names
XAMPP:
http://localhost/my-project
http://my-project.localhost # With vhostsDAMP:
https://my-project.local # HTTPS by default!Common XAMPP → DAMP Changes
phpMyAdmin
XAMPP: Built-in at http://localhost/phpmyadmin
DAMP: Use external tools:
- DBeaver (free, powerful)
- TablePlus (fast, modern UI)
- phpMyAdmin (can run in Docker)
Connect using ports shown in DAMP Services page.
Mail Testing
XAMPP: Mercury mail server (rarely used)
DAMP: Mailpit (modern, web UI)
Install Mailpit service and configure:
MAIL_HOST=damp-mailpit
MAIL_PORT=1025Access web UI at port shown in DAMP.
Multiple PHP Versions
XAMPP: Switch PHP version for ALL projects
DAMP: Each project has its own PHP version!
Troubleshooting
Modernization Benefits
XAMPP to DAMP is a great opportunity to modernize: upgrade PHP, add Redis caching, use proper Laravel tools!