# Restoring a XAMPP Project from Backup

Restoring a XAMPP Project from Backup recreates both the website files and the MySQL database. Work from a copy of the backup so the original remains unchanged.

## Restore project files

1. Install and test XAMPP.
2. Stop Apache and MySQL before replacing project files.
3. Copy the backed-up project folder into `htdocs`.
4. Confirm the folder contains the expected entry page and assets.
5. Start Apache and open the project through localhost.

## Restore the database

1. Start Apache and MySQL.
2. Open `http://localhost/phpmyadmin/`.
3. Create the database name expected by the project, using `utf8mb4`.
4. Select the new database and choose **Import**.
5. Choose the backed-up `.sql` file.
6. Complete the import and inspect tables and fictional records.

If the SQL export already creates and selects the database, read it before creating another database manually.

## Check configuration

Confirm the PDO connection file uses the restored database name and the local XAMPP credentials approved for class. Do not expose credentials in screenshots or public repositories.

## Verify the restoration

Test:

- public entry page
- registration with a fictional user
- login and logout
- role-protected pages
- database queries and processed outputs
- administrator CSV import with a small fictional file

A page loading is not enough; confirm that database changes persist.

## Check

- [ ] Files are inside the correct `htdocs` project folder.
- [ ] SQL import completes without unresolved errors.
- [ ] PDO connects to the restored database.
- [ ] Authentication and role checks work.
- [ ] Imported and processed data matches expected fictional results.
- [ ] Original backup remains unchanged.