Damp

Migrate from XAMPP

Switch from XAMPP to DAMP

Migration Steps

Stop XAMPP Services

Free ports 80 and 443:

  1. Open XAMPP Control Panel
  2. Stop Apache
  3. Stop MySQL
  4. Stop any other running services
  5. Exit XAMPP Control Panel

Add Project to DAMP

  1. Launch DAMP
  2. Click "Add Project"
  3. Select "Existing Project"
  4. Configure:
    • Name: Your project name
    • Path: Your project folder (e.g., C:\xampp\htdocs\my-project)
    • PHP Version: Choose desired version (recommend 8.3)

Install Services

Go to Services page and install required services:

  • MySQL - For database
  • PostgreSQL - If using PostgreSQL
  • Redis - For caching/queues
  • Mailpit - For email testing

Migrate Database (Optional)

If you have existing data, export and import:

Option 1: Command Line

# Export from XAMPP MySQL (via phpMyAdmin or command line)
mysqldump -u root -p your_database > backup.sql

# Import to DAMP (inside VS Code DevContainer)
mysql -h damp-mysql -u damp -pdamp damp < backup.sql

Option 2: GUI Tools

Use database management tools like TablePlus, DBeaver, or HeidiSQL:

  1. Export from XAMPP: Connect to localhost:3306, export database as SQL
  2. Import to DAMP: Get MySQL port from DAMP Services page, connect to localhost:{port}, import SQL file

Connection details for DAMP MySQL:

  • Host: localhost
  • Port: Check DAMP app (Services page)
  • Username: damp
  • Password: damp
  • Database: damp

Update Configuration

Open project in VS Code DevContainer and update configuration:

Laravel .env:

# Update database connection
DB_HOST=damp-mysql
DB_DATABASE=damp
DB_USERNAME=damp
DB_PASSWORD=damp

# Update Redis (if using)
REDIS_HOST=damp-redis

# Update Mail (if using)
MAIL_HOST=damp-mailpit
MAIL_PORT=1025

Plain PHP:

// Update database connection
$conn = new mysqli('damp-mysql', 'damp', 'damp', 'damp');

WordPress wp-config.php:

// Update database credentials
define('DB_HOST', 'damp-mysql');
define('DB_USER', 'damp');
define('DB_PASSWORD', 'damp');
define('DB_NAME', 'damp');

Test Project

  1. Click "Open in VS Code" in DAMP
  2. Reopen in Container when prompted
  3. Browse to https://yourproject.local
  4. Install SSL certificate if prompted

Configuration Changes

Generated Files

DAMP adds these files to your project:

your-project/
├── .devcontainer/
│   └── devcontainer.json
├── .vscode/
│   └── launch.json
├── Dockerfile
├── docker-compose.yml
└── .dockerignore

Service Hostnames

Service names are automatically generated by Docker. Get actual service names and ports from the DAMP app (Services page).

Default pattern:

ServiceXAMPPDAMP
Databaselocalhost or 127.0.0.1damp-mysql
RedisN/Adamp-redis
Maillocalhostdamp-mailpit

Domain Format

ToolFormat
XAMPPhttp://localhost/project
DAMPhttps://project.local

Commands

Run commands directly in DevContainer (no wrapper needed):

php artisan migrate
composer install
npm run dev

Troubleshooting

On this page