WowCodesDocs

Move your store to a new server or domain

Your store is three things: the site's files, its database, and a private folder of settings that sits beside the site. Copy all three and the store runs on the new server as before. A new domain also needs the licence moved to it.

Changing the domain? Move the licence first.

Your licence covers the websites listed on its page in your StartMyMarketplace account. To use a different domain or subdomain, press Move next to the website there: see Licences and domains. Moving to a new server on the same domain needs nothing from us.

What to copy

PartWhere it is
The site's filesYour site folder, including .htaccess, .user.ini, plugins/, assets/themes/, images/ and storage/.
The databaseYour store's database. You can make a copy from your admin panel (see step 2 below).
The private folderprizex_private/<site folder>-<id>, in the nearest folder above your site that isn't a web root. It holds your .env settings file, the licence, database backups and logs. Settings Security Logs Server check shows its exact path.

If Server check says your private files are still inside the site folder, there's no separate private folder yet, and copying the site folder brings everything.

Keep the .env file

Besides your database details, .env can hold the key that encrypts the gateway keys and passwords you saved in the admin (APP_SECRETS_KEY). A fresh .env can't read those, and you would have to type them all in again.

Move to a new server

  1. Close the store

    Turn on maintenance so nobody buys while you copy. Payments already on their way still settle. See Close your store for maintenance.

  2. Copy the database

    In Appearance Software update, use Make a backup, then Download backup. Only an Administrator can do this. Your host's own database export works too. See Back up your store.

  3. Copy the files and the private folder

    Put the site in its folder at the root of the domain or subdomain on the new server. Put the private folder at the same place relative to the site: inside a prizex_private folder in the nearest folder above the site that isn't named like a web root (public_html, www, htdocs, httpdocs, html, web or public). Its name starts with the site folder's name, so if the site folder has a different name on the new server, rename the private folder to match. If you can't put it there, set PX_PRIVATE_PATH in the server's environment to the folder's path.

  4. Import the database

    Create the database and its user on the new server and import your copy. Then open .env in the private folder and update DB_HOST, DB_NAME, DB_USER and DB_PASSWORD.

  5. Point the domain and open the store

    Once the domain points at the new server, open your admin panel. If something is missing, the store stops with a message that names it (see below).

  6. Set up the scheduled task again

    The cron command contains the site's path on the server, so the old one won't work. Copy the new command or URL from Security Logs Cron Logs. See The scheduled task isn't running.

  7. Check and reopen

    Run Server check, then turn maintenance off.

If the store stops with a message

MessageWhat to do
"This store keeps its settings in a private folder beside the site, and it isn't on this server."Copy the private folder from the old server. The message names the folder and where the store looks for it.
"This store's settings file (.env) is on the server but PHP is not allowed to read it."The file's owner or permissions changed in the copy. Give the PHP user read access to the file the message names.
"This store's settings file (.env) is missing, but the store's licence is still on the server"Put .env back in the folder the message names.
Don't start a new install over it

The first and last messages also say how to set the copy up as a new store instead (by deleting a file or a folder). Only do that if you really want an empty store: it doesn't fix a move.

Your licence after a move

  • Same domain: the store keeps running. The licence page of your admin (/admin/activate.php) may show Active · server changed. If you reinstall from scratch on the same domain, see Reinstalling on the same domain.
  • New domain: the licence server answers "This licence is registered to another domain" until the licence is moved. Trying again won't help; move it from your account (Licences and domains). The new address must be the root of a domain or subdomain, not a subfolder.

After moving to a new domain

  1. Change the site address

    Set the new address in Settings General Site URL. See Switch to HTTPS or change your site address.

  2. Update your payment gateways

    Each gateway's return and webhook addresses are built from the Site URL. Copy the new ones into each provider's dashboard. See Set up a gateway's return and webhook addresses. Rewards (coins-only) stores have no gateways and skip this.

  3. Update social sign-in

    If customers sign in with Google, Facebook or Apple, those redirect addresses also come from the Site URL. Copy the new ones from each plugin's panel on Plugins into the provider's settings.

  4. Update a cron URL

    If your host or a cron service calls a URL, change it to the new domain.

Something wrong or unclear on this page? Tell us at [email protected], or see how to get help.