# Backing Up a XAMPP Project

A XAMPP project usually consists of two parts:

1. The website files stored in the `htdocs` folder.
2. The MySQL database storing the application's data.

To create a complete backup, both parts must be saved.

---

## Create a Backup Folder

Create a folder somewhere safe, such as:

```text
OneDrive - Department of Education
└── XAMPP Backups
```

Inside it create:

```text
XAMPP Backups
├── Website Files
└── Databases
```

[![](https://mr.napper.au/uploads/images/gallery/2026-06/scaled-1680-/image-1781051544998.png)](https://mr.napper.au/uploads/images/gallery/2026-06/image-1781051544998.png)

## Back Up the Website Files

Open the XAMPP installation folder.

Example:

```text
C:\xampp\htdocs\
```

Locate your project folder.

Example:

```text
C:\xampp\htdocs\security_dashboard
```

Copy the entire project folder into:

```text
XAMPP Backups
└── Website Files
```

Your backup should now contain:

```text
Website Files
└── security_dashboard
```

This backup includes:

- HTML files
- PHP files
- CSS files
- JavaScript files
- Images
- JSON files

## Open phpMyAdmin

Open phpMyAdmin in your browser.

Example:

[http://localhost/phpmyadmin/](http://localhost/phpmyadmin/)

Select the database used by your project.

Example:

```text
project_db
```


## Export the Database

Click:

```text
Export
```

Choose:

```text
Method: Quick
Format: SQL
```

Click:

```text
Export
```

A file similar to the following will be downloaded:

```text
project_db.sql
```

[![](https://mr.napper.au/uploads/images/gallery/2026-06/scaled-1680-/image-1781051677167.png)](https://mr.napper.au/uploads/images/gallery/2026-06/image-1781051677167.png)

## Save the Database Backup

Move the downloaded SQL file into:

```text
XAMPP Backups
└── Databases
```

Your backup folder should now contain:

```text
XAMPP Backups
├── Website Files
│   └── security_dashboard
│
└── Databases
    └── project_db.sql
```


## Test the Backup

Before making major changes to a project, check that:

- Website files have been copied successfully.
- The SQL file exists.
- The SQL file is not empty.

A backup is only useful if it can be restored.

---

## Complete Backup Checklist

### Website Files

```text
✔ Project folder copied
✔ Images copied
✔ CSS copied
✔ JavaScript copied
✔ PHP files copied
```

### Database

```text
✔ Database selected
✔ Export completed
✔ SQL file saved
```

---

## Backup Structure Example

```text
XAMPP Backups
├── Website Files
│   └── security_dashboard
│       ├── index.php
│       ├── dashboard.php
│       ├── css
│       ├── js
│       └── images
│
└── Databases
    └── project_db.sql
```

You now have a complete backup of your XAMPP project.

Next tutorial: **Restoring a XAMPP Project from Backup**.