XAMPP Backup and Recovery Back up, restore and transfer both XAMPP project files and MySQL databases safely. Backing Up a XAMPP Project A working XAMPP project normally has two separate parts: website files inside htdocs and data stored in MySQL. A complete backup needs both. Back up project files Stop active editing and save every file. Locate the project folder inside htdocs. Copy the entire project folder to an approved backup location. Name the backup clearly with project and date. Open the copy and confirm key PHP, CSS, JavaScript and asset files are present. Do not use a synchronised copy as the only backup. Export the database Start Apache and MySQL. Open http://localhost/phpmyadmin/. Select the project database. Choose Export. Use SQL format and complete the export. Save the .sql file beside the project-file backup. Do not treat XAMPP’s raw mysql storage folder as a portable database backup. Protect sensitive information Use fictional data only. Check that backups and screenshots contain no real student records, personal passwords or hosted-server credentials. Verify the backup A backup is not proven until it can be inspected or restored. Confirm: project archive opens expected folders and files are present SQL file is not empty SQL contains expected table definitions backup location is accessible from another approved device Check Project files and SQL export are both included. Backup name and date are clear. Original project still runs. Backup contains only fictional data. At least one recoverable copy exists outside the working folder. 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 Install and test XAMPP. Stop Apache and MySQL before replacing project files. Copy the backed-up project folder into htdocs. Confirm the folder contains the expected entry page and assets. Start Apache and open the project through localhost. Restore the database Start Apache and MySQL. Open http://localhost/phpmyadmin/. Create the database name expected by the project, using utf8mb4. Select the new database and choose Import. Choose the backed-up .sql file. 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. Moving a XAMPP Project to Another Computer Moving a XAMPP project requires a verified backup of both the project files and its database. Prepare the source computer Save all source files. Export the project database as SQL through phpMyAdmin. Copy the complete project folder from htdocs. Include the SQL export and a short setup note. Stop MySQL and Apache cleanly. The setup note should record the project folder, local URL, database name and any approved port changes. Do not record real passwords. Transfer safely Use an approved storage location. Keep a separate source backup until the destination has been tested. Do not email sensitive archives or use real personal data. Restore on the destination Install and test XAMPP. Copy the project folder into the destination htdocs. Create or select the expected database. Import the SQL file. check the PDO connection settings. Start Apache and MySQL. open the project through localhost. Test the complete journey Use fictional accounts and data to test registration, login, roles, protected pages, CSV import, database storage and meaningful outputs. Common problems Problem Check Page not found Folder name and localhost URL Database connection fails Database name and PDO settings Tables missing Correct SQL file and selected database Styles or images missing Relative paths and filename case Login fails User table, complete hashes and session setup Import fails Role, form encoding, file limits and headers Check Files and SQL were transferred. Source backup remains recoverable. Destination passes the full user journey. No real credentials or personal data are included. Configuration differences are recorded.