Upload folder

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.

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.

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

In my local VM

That is picture is how looks my local vm, in shared folder is nothing.

The links in my local wp installation are

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

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


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

Here I send you another images from the web

Thx again for your help.

@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

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

1 Like