Migrating Cockpit CMS / Wrong Image paths

Hey,

I got some trouble migrating a cockpit application to a production server. Unfortunately I couldn’t find any information in the docs, so i’m writing here.

I’ve installed cockpit on my local machine, added some test data (mostly singletons with a gallery) and uploaded some images. After migrating the CMS to the production server everything looked fine in the first place. All assets were available. But when I tried to request the gallery from the singletons via the api i’m getting paths to the localhost and not to the current environment. When I inspect an image files in the assets, the path looks correct.

Is there anything I missed while migrating. Thanks for your help.

Thanks
Julian

Check your config.yaml file if you have a site_url value, try to have it like:

site_url: https://www.yoursite.com

Thanks, I’ve tried that but unfortunately the issue is still present.

try to run the command line tool (in cockpits root folder)

./cp export --target /path/to/folder

then search and replace in the json files your staging/dev url with the production one.

on the production server import the data again:

./cp import --src /path/to/folder