Moving a XAMPP Project to Another Computer

One of the advantages of using XAMPP is that projects can easily be moved between computers.

This is useful when:

A complete project transfer requires:

  1. Website files.
  2. Database files.

On the Original Computer

Before moving the project, create a backup.

You should have:

XAMPP Backups
├── Website Files
│   └── security_dashboard
│
└── Databases
    └── project_db.sql

If you have not already created a backup, refer to:

Backing Up a XAMPP Project

Copy the Backup Files

Copy the backup folder to:

Example:

USB Drive
└── XAMPP Backups

image-1781051544998.png

Install XAMPP on the New Computer

Download XAMPP:

https://www.apachefriends.org/

Install XAMPP using the default settings.

The installation folder will usually be:

C:\xampp\

Start XAMPP

Open the XAMPP Control Panel.

Start:

Apache
MySQL

Both services should show a green status.

image-1781051802720.png

Copy the Website Files

Open:

C:\xampp\htdocs\

Copy the project folder from your backup.

Example:

security_dashboard

Paste it into:

C:\xampp\htdocs\

Your folder structure should now look like:

C:\xampp\htdocs\
└── security_dashboard

Create the Database

Open phpMyAdmin:

http://localhost/phpmyadmin/

Click:

New

Create a database with the same name as the original project.

Example:

project_db

Click:

Create

Import the Database Backup

Select:

project_db

Click:

Import

Choose:

project_db.sql

Click:

Import

Wait for the import to complete.

image-1781051867640.png

Verify the Tables

After importing, you should see the project tables.

Example:

project_db
├── users
├── security_events
└── products

Your tables may differ depending on the project.

Check the Database Connection

Open the database connection file used by the project.

Example:

$conn = new mysqli(
    "localhost",
    "root",
    "",
    "project_db"
);

Verify:

The default XAMPP configuration uses:

Server: localhost
Username: root
Password: (blank)

Test the Website

Open:

http://localhost/security_dashboard/

Check:

Common Problems

Database Not Found

Example:

Unknown database 'project_db'

Solution:


Table Not Found

Example:

Table 'project_db.users' doesn't exist

Solution:


Access Denied

Example:

Access denied for user 'root'

Solution:


Page Not Found

Example:

404 Not Found

Solution:

C:\xampp\htdocs\

Transfer Checklist

Website Files

✔ Project folder copied
✔ Files restored to htdocs
✔ Images restored
✔ CSS restored
✔ JavaScript restored
✔ PHP files restored

Database

✔ Database created
✔ SQL file imported
✔ Tables restored
✔ Data restored

Testing

✔ Website loads
✔ Database connection works
✔ Forms work
✔ Login works
✔ Data displays correctly

Complete Process

Original Computer
        ↓
Create Backup
        ↓
Copy to USB / Cloud Storage
        ↓
Install XAMPP
        ↓
Copy Website Files
        ↓
Create Database
        ↓
Import SQL File
        ↓
Test Website

You have successfully moved a XAMPP project to another computer.


Revision #1
Created 2026-06-10 00:56:21 UTC by Mr Napper
Updated 2026-06-10 00:56:26 UTC by Mr Napper