Current SqueHub versionv2.0.0
Getting started Β· v1.x

Backup and upgrade

πŸ”’ Backup & Update Guide πŸ“Œ Why Backup Before Updating? Before upgrading your Squehub project to a newer version, it's crucial to back up your application-specific files. Your views, configuration files, and local logic aren't part of the…

Historical v1.x reference. These examples describe the original API. Read the current v2.x guides or the upgrade guide.

πŸ”’ Backup & Update Guide

πŸ“Œ Why Backup Before Updating?

Before upgrading your Squehub project to a newer version, it's crucial to back up your application-specific files. Your views, configuration files, and local logic aren't part of the core framework and could be overwritten or lost during an update.

🧰 Step 1: Create a Backup

Use the built-in CLI command to generate a safe developer backup:

CODE
php squehub backup:dev

The backup will include:

  • .env file
  • config.php file
  • /config/ directory
  • /database/ directory
  • /project/ directory
  • /views/ directory

A ZIP file like squehub_dev_backup_YYYYMMDD_HHMMSS.zip will be saved to: /storage/backups/dev/

πŸ“₯ Step 2: Install the Latest Squehub Version

Install a fresh Squehub framework copy into a new folder:

CODE
composer create-project squehub/squehub updatedapp

Then navigate into the newly created project:

CODE
cd updatedapp

πŸ—‘οΈ Step 3: Delete Default Files & Folders

In the new installation, delete the following default files and directories to avoid conflicts:

  • .env
  • config.php
  • /config/
  • /database/
  • /project/
  • /views/

Option 1: If you have terminal access (recommended):

CODE
rm .env
rm config.php
rm -r config/
rm -r database/
rm -r project/
rm -r views/

Option 2: On Shared Hosting or cPanel:

If command-line access is not available, use your hosting provider’s file manager (like cPanel) to manually:

  • Navigate to the root of your project (e.g., /updatedapp)
  • Select and delete the listed files and folders
  • Use the "Extract" tool to unzip your backup file into this directory

πŸ“¦ Step 4: Extract and Restore Backup

Locate your backup ZIP file from /storage/backups/dev/ and extract its contents into the root of your new project directory.

This will restore your environment file, configuration, database, views, and custom logic.

βœ… Step 5: Run Your Updated Project

Start the development server:

CODE
php squehub start

Then open your browser and visit: http://localhost:8000

⚠️ Reminder: After restoring, test your app thoroughly. Once verified, commit your changes to version control if you're using Git or similar tools.