Damp

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?

FeatureXAMPPDAMP
DevContainers❌ No✅ Full VS Code integration
Web ServerApacheCaddy (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:

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

Export XAMPP Database

Export your database data:

  1. Open browser: http://localhost/phpmyadmin
  2. Select your database
  3. Click "Export" tab
  4. Choose "Quick" method
  5. Click "Go" to download .sql file

Open DAMP

Launch DAMP and click "Add Site" button.

Select "Existing Project"

Choose the Existing Project option.

Configure Site

Fill in the details:

FieldValueExample
NameYour site namemy-xampp-site
PathYour XAMPP projectC:\xampp\htdocs\my-project
PHP VersionUpgrade recommended8.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:

ServiceInstall?XAMPP Equivalent
MySQL✅ RequiredMySQL
PostgreSQL✅ If neededN/A
Redis✅ RecommendedN/A
Mailpit✅ RecommendedMercury (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.sql

Or use phpMyAdmin-like tools:

  1. Install DBeaver or TablePlus
  2. Connect to localhost:<port> (find port in DAMP)
  3. Import .sql file

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=damp

Plain 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-project

DAMP:

https://my-project.local

Update in database or config files.

Test Your Site

  1. Open in VS Code: Click "Open in VS Code" in DAMP
  2. Reopen in Container when prompted
  3. Browse to https://my-project.local
  4. 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.1

DAMP:

$host = 'damp-mysql';  // Container name

Domain Names

XAMPP:

http://localhost/my-project
http://my-project.localhost  # With vhosts

DAMP:

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=1025

Access 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!

Next Steps