Left Icon Right Icon
Squehub SqueHub

🔒 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:

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:

composer create-project squehub/squehub updatedapp

Then navigate into the newly created project:

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):

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:

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.
;