Skip to main content

Backing Up a XAMPP Project

A working XAMPP project usuallynormally consists ofhas two separate parts:

    The website files stored in theinside htdocs folder.and Thedata MySQLstored databasein storingMySQL. the application's data.

    To create aA complete backup,backup bothneeds parts must be saved.


    Create a Backup Folder

    Create a folder somewhere safe, such as:

    OneDrive - Department of Education
    └── XAMPP Backups
    

    Inside it create:

    XAMPP Backups
    ├── Website Files
    └── Databases
    

    both.

    Back Upup project files

      Stop active editing and save every file. Locate the Website Files

      Open the XAMPP installation folder.

      Example:

      C:\xampp\htdocs\
      

      Locate your project folder.

      folder

      Example:

      inside
      C:\xampp\htdocs\security_dashboardhtdocs.

      Copy the entire project folder into:to
      XAMPPan Backups
      └── Website Files
      

      Yourapproved backup shouldlocation.

      nowName contain:
      Website Files
      └── security_dashboard
      

      Thisthe backup includes:

      clearly
        with HTMLproject filesand date. PHP files CSS files JavaScript files Images JSON files

        Open phpMyAdmin

        Open phpMyAdmin in your browser.

        Example:

        http://localhost/phpmyadmin/

        Select the databasecopy usedand byconfirm yourkey project.

        PHP, CSS, JavaScript and asset files are present.

        Example:Do not use a synchronised copy as the only backup.

        project_db
        

        Export the Databasedatabase

          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

          Click:Use fictional data only. Check that backups and screenshots contain no real student records, personal passwords or hosted-server credentials.

          Export

          Verify

          the

          Choose:

          Method: Quick
          Format: SQL
          

          Click:

          Export
          
          backup

          A filebackup similaris tonot theproven followinguntil willit can be downloaded:

          inspected
          project_db.sqlor 
          restored.

          Save the Database Backup

          Move the downloaded SQL file into:

          XAMPP Backups
          └── Databases
          

          Your backup folder should now contain:

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

          Test the Backup

          Before making major changes to a project, check that:Confirm:

          • Websiteproject archive opens
          expected folders and files haveare been copied successfully.present The SQL file exists. The SQL file is not empty.empty SQL contains expected table definitions backup location is accessible from another approved device

          A

          Check

          backup
          is Project files and SQL export are both included.  Backup name and date are clear.  Original project still runs.  Backup contains only usefulfictional ifdata. it canAt beleast restored.one
          recoverable

          Completecopy Backupexists Checklist

          outside

          Websitethe Files

          working
          folder.
          Project folder copied ✔ Images copied ✔ CSS copied ✔ JavaScript copied ✔ PHP files copied

          Database

          ✔ Database selected
          ✔ Export completed
          ✔ SQL file saved
          

          Backup Structure Example

          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.