# Issue after moving cockpit cms to another folder

**URL:** <https://discourse.getcockpit.com/t/issue-after-moving-cockpit-cms-to-another-folder/1117>\
**Category:** Support\
**Created:** [December 9, 2019, 10:32pm UTC](https://discourse.getcockpit.com/t/issue-after-moving-cockpit-cms-to-another-folder/1117 "2019-12-09T22:32:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillyBrown](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/willybrown/32/454_2.png) [@WillyBrown](https://discourse.getcockpit.com/u/WillyBrown)\
**Post date:** [December 9, 2019, 10:32pm UTC](https://discourse.getcockpit.com/t/issue-after-moving-cockpit-cms-to-another-folder/1117/1 "2019-12-09T22:32:39Z")

</div>

Hi cockpit dev,

I Use cockpit with SQLite database.

I would like to move the CMS to another folder, problem is thumbnails links generated continue to be target on the old url of `storage/thumbs/`. I understand old thumbnails links are store in database. So my question is, there is a way to “source” datas after moving or deploy Cockpit ?

More generally, what is best practices to manage data when we deploy cockpit ? Is it to get one `storage/` folder per env ?

Thanks!

---

<div class="post-metadata">

**Author:** ![WillyBrown](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/willybrown/32/454_2.png) [@WillyBrown](https://discourse.getcockpit.com/u/WillyBrown)\
**Post date:** [December 10, 2019, 7:26am UTC](https://discourse.getcockpit.com/t/issue-after-moving-cockpit-cms-to-another-folder/1117/2 "2019-12-10T07:26:26Z")

</div>

Another thing about this subject.  
I generate different thumbnails sizes per Gallery image with this script.

```php
$sizes = [640, 768, 1024, 1440, 1960];
foreach ($sizes as $size)
{
    $url = cockpit('cockpit')->thumbnail([
        'src' => $galleryImage["path"],
        'mode' => 'fitToWidth',
        'width' => $size
    ]);
    
    // ...
}

```

This one return a complete url of the thumbnail. (ex: [http://localhost/cokpitfolder/storage/thumbs/](http://localhost/cokpitfolder/storage/thumbs/)…)

About migration of cockpit folder I was thinking it could be better to get a relative path to the thumbnail (ex: /storage/thumbs/…).

Like says @pauloamgomes:

> [@Images not showing because relative asset path in WYSIWYG content](https://discourse.getcockpit.com/t/images-not-showing-because-relative-asset-path-in-wysiwyg-content/1049/4):
>
> It’s not a good practice to store the full image path in the field (what happens if you need to change the domain?) Is your static website served by you (e.g. using nginx or apache)? If so, you can setup some rewrite rules that will serve the static images, something similar to: location /storage/ { root /var/www/cockpit/storage; }

Is there a way to get this thumbnail path?

---

<div class="post-metadata">

**Author:** ![WillyBrown](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/willybrown/32/454_2.png) [@WillyBrown](https://discourse.getcockpit.com/u/WillyBrown)\
**Post date:** [December 15, 2019, 9:38am UTC](https://discourse.getcockpit.com/t/issue-after-moving-cockpit-cms-to-another-folder/1117/3 "2019-12-15T09:38:07Z")

</div>

Any suggestions? 😕
