Updating Shadow Store
To update Shadow Store, follow these steps:
Before Updating
-
Make a backup of your important files:
.env
file - Contains your configuration settingsstatic
folder - Houses your custom themes and assetsfiles
folder - Contains your uploaded files and data
Store these backups in a safe location outside the installation directory
Update Process
Forever is used in this example as per the installation guide, but any process manager can be used (PM2, Nodemon, etc.)
For forever, you will have to get the PROCESSID via running forever list
and finding the valid ID of the process. It will be the number inside of brackets (aka: []
) just before the UID.
-
Prepare for Update
ImportantFor major version updates (e.g., 1.x to 2.x), completely stop the application:
Useforever stop PROCESSID
if using Forever or terminate the running Node.js process however you normally would.
For minor updates, a restart at the end is sufficient. -
Delete the following files/folders:
package.json
server.js
build
folder - Must be completely deleted, not just replacedImportant: Simply replacing files in the build folder can cause errors due to mismatched or obsolete files
Note: Do NOT delete your backed-up files!
-
Download the latest release from Shadow Store Releases
- Check release notes for specific update instructions
- Some updates may require you to update npm packages or add new directories
- Download the appropriate version
- Check release notes for specific update instructions
-
Copy the new files to your installation directory
- Extract the downloaded release
- Copy all files except the
.env
,static
andfiles
folders
-
If the release notes mention package updates:
- Delete
package-lock.json
andnode_modules
folder - Run
npm install
to install new dependencies - Wait for installation to complete
- Delete
-
Check release notes for any
.env
file changes- Update your
.env
file with any new required variables - Keep your existing configuration values
- Add any new required settings
- Update your
-
Restore your backed-up folders if needed:
static
folder - For assetsfiles
folder - For product content
-
Restart Shadow Store
Update Type- For major updates: Use
forever start server.js
if using Forever - For minor updates: Use
forever restart PROCESSID
if using Forever
- Or use your preferred process manager's restart command
- Check logs for any startup errors
- For major updates: Use