# Migrating Cockpit CMS / Wrong Image paths

**URL:** <https://discourse.getcockpit.com/t/migrating-cockpit-cms-wrong-image-paths/368>\
**Category:** Support\
**Created:** [October 26, 2018, 11:51am UTC](https://discourse.getcockpit.com/t/migrating-cockpit-cms-wrong-image-paths/368 "2018-10-26T11:51:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlnschfr](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jlnschfr](https://discourse.getcockpit.com/u/jlnschfr)\
**Post date:** [October 26, 2018, 11:51am UTC](https://discourse.getcockpit.com/t/migrating-cockpit-cms-wrong-image-paths/368/1 "2018-10-26T11:51:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [October 26, 2018, 12:13pm UTC](https://discourse.getcockpit.com/t/migrating-cockpit-cms-wrong-image-paths/368/2 "2018-10-26T12:13:13Z")

</div>

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

`site_url: https://www.yoursite.com`

---

<div class="post-metadata">

**Author:** ![jlnschfr](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jlnschfr](https://discourse.getcockpit.com/u/jlnschfr)\
**Post date:** [October 26, 2018, 12:18pm UTC](https://discourse.getcockpit.com/t/migrating-cockpit-cms-wrong-image-paths/368/3 "2018-10-26T12:18:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/artur/32/4_2.png) [@artur](https://discourse.getcockpit.com/u/artur)\
**Post date:** [October 26, 2018, 5:43pm UTC](https://discourse.getcockpit.com/t/migrating-cockpit-cms-wrong-image-paths/368/4 "2018-10-26T17:43:27Z")

</div>

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

```auto
./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:

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

```
