How to migrate standalone version?

General Migration

January 1, 2025 12:00 PM

How to Migrate a Script (Standalone)

To migrate any standalone script, follow these steps carefully:

Verify Domain/Subdomain Setup

  • Ensure the domain or subdomain where you want to migrate is functioning correctly.
  • Test it by placing an index.php file with "Hello World!" content in the root directory. Navigate to your domain/subdomain in a browser to confirm you see the expected output.

Check Server Prerequisites

  • Confirm that the new server meets all the prerequisites required for the script to function.

Prepare the Existing Script

  • Delete the public/storage directory.
  • Create a zip archive of the existing, fully functional script. Ensure all files are included in the archive.

Backup the Database

  • Export the database in .sql or .sql.gz format as a backup.

Import the Database

  • Import the database to the new server.
  • You may need to disable foreign key checks during the import process.

Upload and Extract Files

  • Upload the zip archive to the new server and extract it.

Update Configuration

  • Open the .env file and update the database credentials.
  • Update the following environment variables to reflect the new domain:
    • APP_URL
    • SESSION_DOMAIN
    • SANCTUM_STATEFUL_DOMAINS

Recreate Storage Link

  • Log in to the terminal via SSH and run the following command:
    php artisan storage:link
    

Verify Migration

  • Navigate to your new domain/subdomain. You should see the login screen.

Activate the New Domain
- You will be prompted to enter an access code after migration.
- Visit scriptmint.com, add your new domain, and generate a new access code.
- If necessary, deactivate the access code for your previous domain.

Note:
Migrating a script to another domain does not fall under standard support. If you encounter any issues, you can request paid assistance.

Newsletter Subscription

Subscribe & get latest updates from ScriptMint

Related Articles