Skip to main content
Menu
Search
Start Here

Back Up, Restore, and Move SalePro to a New Server

A complete backup is the database plus the SalePro folder (with .env, storage and uploads). Take one before every update and on a regular schedule.

A full SalePro backup has two parts. You need both to restore.

Part What it holds How to back it up
Database Products, stock, sales, purchases, customers, accounting, settings Settings > Backup Database, or your hosting's phpMyAdmin
Files The SalePro program, your .env settings file, uploaded logos, product images and documents Compress the SalePro folder in your hosting file manager

Tip: Back up before every update, and at least once a week. Keep copies off the server too (your computer or cloud storage), in case the server itself fails.

Back up the database#

From inside SalePro#

  1. Go to Settings > Backup Database.
    Settings menu with Backup Database
    Settings menu with Backup Database
  2. SalePro builds the backup and your browser downloads a .zip file. It contains one .sql file with your whole database.
  3. Keep the zip somewhere safe.

This needs the Backup Database permission, which Admin has by default. It doesn't work on the public demo.

From your hosting (cPanel)#

Use this for very large databases, or when SalePro won't open.

  1. Open cPanel > phpMyAdmin and click your SalePro database on the left.
  2. Click Export, keep Quick and format SQL, and click Export (or Go).
  3. Save the .sql file.

Back up the files#

  1. Open cPanel > File Manager and go to the folder that holds SalePro, usually public_html or a subfolder.
  2. Select the SalePro folder (or all its files), click Compress, and choose Zip Archive.
  3. Download the zip, then delete it from the server.

Note: Make sure hidden files are included. Click Settings > Show Hidden Files (dotfiles) in File Manager. The .env file holds your database login and app key. Without it, the restored site can't read your data.

Restore a backup#

Restore puts the database and files back exactly as they were when the backup was taken. Anything entered after that is lost.

  1. Files: in File Manager, upload your files zip to the SalePro location and click Extract. Replace the existing files when asked.
  2. Database: in phpMyAdmin, select the SalePro database.
    1. Click Operations, then Drop the database, or select all tables and choose Drop, to empty it.
    2. Click Import, choose the .sql file (unzip the SalePro backup first), and click Import (or Go).
  3. If the database name, user or password differ from the backup, edit .env and update DB_DATABASE, DB_USERNAME and DB_PASSWORD.
  4. Open SalePro and log in. Check the dashboard, a product's stock, and the latest sale.

Move SalePro to a new server or domain#

  1. On the old server, take a full backup: the database and the files.
  2. On the new server:
    1. Create a database and a database user with all privileges (same as during installation).
    2. Upload and extract the files zip.
    3. Import the .sql file into the new database.
  3. Edit .env on the new server:
    • DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD: the new database details;
    • APP_URL: the new address, for example https://pos.example.com.
  4. Make storage and bootstrap/cache writable (folders 755).
  5. In the hosting terminal, in the SalePro folder, run:
    php artisan optimize:clear
    php artisan storage:link
  6. Log in and check the dashboard, POS, a product image and a printed invoice. If images are missing, check that the public upload folders (logo, images, documents) came across.
  7. If you use the online store, payment gateways, WooCommerce or the mobile app, update any callback URLs or app server addresses to the new domain.

Important: If SalePro asks for your purchase code again after the move, enter it. If it's refused, contact support with your purchase code and the old and new domains.

Did this guide solve your problem?

If something is unclear, tell support which guide and section you were following.

Get help
WhatsApp