After that all my pictures went away
When you create a post, and insert pictures into it, it places in the code for you, with the path to the image based upon your settings. When you moved your site, you changed the path. That’s why no images are showing up – they’re still pointing to your old server path. (WordPress doesn’t change the already posted and existing URLs within your posts.) You need to go in and either change all the paths in your posts to the correct place *or* also move your folder so the path already put in is correct.
This is probably also what has happened with your uploads folder – it’s looking for it in the old spot, and still uploading to the old spot – which is why you can’t see it because your settings are looking for it in a new spot.
Thread Starter
jduv
(@jduv)
Thanks for the reply. I think the problem is slightly more complicated than that. Note that my WP install lives at /websiteroot/html. Here’s what I have done so far:
1) Reset the uploads folder to “uploads.” WordPress promptly created a new directory: /websiteroot/html/uploads.
2) I uploaded a test image, call it img1.png, and wp still gets the error with thumbnails. But, it does stick img1.png in the correct place, i.e. /websiteroot/html/uploads/…/img1.png.
3) I create a test post with that image linked to double check the URL. It turns out correct:
/websiteroot/html/uploads/…/img1.png.
4) Perplexed, I think to myself: could this be a permissions problem? Curious, I double check the perms on img1.png and it’s not world readable. So THATS why WP can’t see my images.
5) I added world readable to the image via an ftp client, and the image now shows up in both the uploads manager and on the website.
So, someone with more php and WP api experience than me tell me how to fix this =). Is it a simple edit in the .htaccess or something more complicated?
Thanks guys!
fix what? Sounds like you’ve fixed it – you just said you changed the permissions on your uploads folder to make it world readable (which it *should* be) and now your uploads and images are being seen just fine…so what needs fixed? IF you mean you need to do this to *all* of your images, then yeah, FTP in, select your images, and change the permissions (you can do them all at once, usually).
But still, your *old* posts – prior to the migration – will have the old URL, which is why they won’t be seen. You can either log in and update each post one by one, or you can put the old images for the old posts back in the old path – which would be easier.
Thread Starter
jduv
(@jduv)
Thanks for your reply!
Yes, the folder is world readable, but brand new images are not world readable *after* they are uploaded using the upload manager. This leads me to believe that the problem lies in the upload code in wordpress or some server misconfiguration. I can duplicate this error easily, and I’m still investigating the cause. I don’t think I made that clear in the previous post: apologies.
I understand the issue with old posts and moving the site. That’s not a problem at all. I will take care of redirecting all those links after I get new images uploading properly. However, I do not want to have to set perms EVERY time I upload a new image. That’s ridiculous =).
This leads me to believe that the problem lies in the upload code in wordpress or some server misconfiguration.
It would be server misconfiguration. Wen hosts provide default permissions for files and folders – WordPress doesn’t change those permissions. Your host has your filesystem set to a default that doesn’t work basically. You need to contact your host and have them change your default file permissions so you don’t have to keep logging in and changing the permissions manually so people can see things.
Most hosts *usually* have defaults for folders set at 755, and files at 644. But as I said, WordPress doesn’t touch file permissions (unless *you* specifically make it do that, and that would take some coding on your part) – so it’s not a WordPress thing.