# Upload folder

**URL:** https://discourse.roots.io/t/upload-folder/5761
**Category:** trellis
**Created:** 2016-01-25T14:50:28Z
**Posts:** 5

## Post 1 by @jdaquila — 2016-01-25T14:50:29Z

I manage to upload my local db with some post in my remote server, my question is about how I do with the media library, I can see all the images in the media library like in my local but of course are broken because are missing in the server.

I try to upload the images with command lines

```
scp -r 2016/01/ root@remoteserverip:/srv/www/myweb.de/shared/uploads/
```

I see the images there but in wp are not displaying, then I try to create a post in the remote server add and images and I can see the images is save in that folder.

What I’m doing wrong or what I miss from the doc.

---

## Post 2 by @ben — 2016-01-25T15:50:44Z

The code snippet you provided doesn’t really help us considering we don’t know what the current working directory was…

If the images are returning a 404 on the server but you see them in the correct place in the uploads directory, try restarting PHP-FPM.

---

## Post 3 by @jdaquila — 2016-01-25T16:08:59Z

HI @ben thx for the fast answer I try to give you more info, hope helps.

In my local I have the images in this directory

windows path  
`C:\wamp\www\md-zitronenzauber-trellis\site\web\app\uploads`

In my local VM  
`/srv/www/zitronenzauber.de/current/web/app/uploads$`

That is picture is how looks my local vm, in shared folder is nothing.  
 ![](https://discourse.roots.io/uploads/default/original/2X/8/8eca531cd284caa39fbda3342a9a1b236fe885f9.png)

The links in my local wp installation are  
`http://zitronenzauber.dev/wp-content/uploads/2016/01/Jugendliche.jpg`

Then in the remote server I try to upload the images by myself running this command.  
`scp -r 2016/01/ root@remoteserverip:/srv/www/myweb.de/shared/uploads/`

My remote server look like this

 ![](https://discourse.roots.io/uploads/default/original/2X/5/5aeaf31672a876e17bc3de1f173485cb9ab97480.png)

I try to do it manually becaouse the folder shared was empty and if I have a look in the links from the images are

`http://dev.zitronenzauber.de/wp-content/uploads/2016/01/Jugendliche.jpg`

For sure I did all wrong, but I don’T have any idea how that has to work with the images, is some doc where shows this processes, I was searching in the foro but didn’t find something where I can follow for a solution.

If I create a new post and add one images I can see is saves it in this location  
` /srv/www/zitronenzauber.de/shared/uploads/2016/01`

Here I send you another images from the web

 ![](https://discourse.roots.io/uploads/default/original/2X/9/9cceafe41abecf8e1b813856b487f982346058ac.png)

Thx again for your help.

---

## Post 4 by @fullyint — 2016-01-25T18:46:33Z

@jdaquila Could you verify that the images were copied to the right place on the server, with ownership like the other web files? They should show up here with `web:www-data`:

```
ls -al /srv/www/zitronenzauber.de/shared/uploads/2016/01
```

If I run your `scp` command, I end up with the images in `uploads/01/Jugendliche.jpg` with ownership `root:root` but they should be in `uploads/2016/01/Jugendliche.jpg` with ownership `web:www-data`.

Maybe you need to switch your command from

```
scp -r 2016/01/ root@remoteserverip:/srv/www/myweb.de/shared/uploads/
```

to this:

```
scp -r 2016 web@remoteserverip:/srv/www/zitronenzauber.de/shared/uploads
```

---

## Post 5 by @jdaquila — 2016-01-26T08:33:23Z

Thanks again for your help @fullyint, I change my command like you show me and works perfect now :slight_smile:
