Moving Shopware 6 from one server to another

Hi,

I would like to move my Shopware 6.4.20.0 (Com ed) app from one server to another.

To do this in version 5, I would have followed this procedure:
Copy files and database (put them on new environment). (already done)
Go to s_core_shops table and alter the host and hosts fields (if they changed). (this table does not exist in v6 - have not gone further)
Go to config.php in the root directory of the shopware file and alter it for connecting the right database.
(Deactivate cyphered Plug-Ins if the host changed)

But the above is no longer valid for v.6

The SALES_CHANNEL_DOMAIN table has the correct URL.

Could someone please provide or point me to an updated process?

Thank you!

Copy files and database, adjust the .env (url and composer, etc), change die url of your sales channel in the administration (backend should still work with a wrong url), clear cache.

Shopware might ask you to migrate plugin licenses.
It is explained in the official documentation.

Hi Max_Shop

Thank you for taking the time to reply!

Both the database. and .env file seem correct. The 3 cells of the SALES_CHANNEL_DOMAIN have the correct URL.

The database reference and APP_URL in the .env file also look okay.
Can you give me an example of how the COMPOSER_HOME should look?

Thanks again!

It must be the absolut path on the server to the composer installation, e.g.

COMPOSER_HOME="/var/www/domain.com/var/cache/composer"

Thanks!

Although it looks different, it seems that the env file is correct. Based on the original installation, which works fine - but the cloned instance with updated host and server throw a 500 error (log: GET / HTTP/1.0" 500 997 „-“) for both frontend and admin.

Could there be some unique identifier that is not being verified?

What about the error message in var/log/prod-2023-05-xx.log ?

Sorry for the delayed response. The log is empty.
The original instance on the first server has a populated log but this clone’s ‚public_html > var > log‘ is empty.

I’m thinking of cloning the server again but this time moving the other application and keeping Shopware where it is - I know that this works, although it is not the solution I wanted.

I’ve marked the second post in this thread as the solution.

A few months after my original post, I used the host’s docker type copy function to create a new staging version from prod and following the same procedure as before and in post #2, this time it worked. There may be a difference in how the host creates clones / staging environments.