Reward Loyalty文档

Reinstalling the Script

Reinstall With Fresh Data

If you are considering reinstalling the script to refresh the database or exploring a different configuration, such as integrating a new database, follow the steps below.

Quick Points:

  • There is no requirement to re-upload any files.
  • Manually dropping database tables is not necessary.
  • You don’t need to set up a new database. During the installation’s new database migration, all previous tables are automatically purged.

Reinstallation Steps:

  1. Open the .env file located in your web root.
  2. Search for the following line:
    # If "false" then installation will show
  3. Replace it with:
    # If "false" then installation will show
  4. Ensure you save any modifications made to the .env file.
  5. Go to the URL where the script was originally uploaded. You will then see the installation interface.

Reinstalling While Preserving Existing Data

If you want to preserve data, it’s crucial to retain certain files and directories containing user data:

  1. .env File: Located in the web root, this file contains all settings and the key to encryption.
  2. SQLite Database: If you use SQLite, the database/database.sqlite file.
  3. User Uploads: All files and directories in the public/files folder.
  4. Custom Modifications: Preserve any files that you have personally modified or added, including images and other media.

Do NOT delete the above files and folders!

For the rest, follow these steps:

  1. Delete Files: Remove all other files and folders in your web root directory.
  2. Upload Latest Version: Upload the latest version of the script.

This refreshes all files while preserving user data.