Can’t upload media, permissions are correct

I did a manual backup and re-install of a WP site, and it worked fine. Then my client updated some plugins, regretted it and asked me to restore the site to its previous state. I used the same backup I had from the first time, but now it turns out my client can’t upload media.

I go to the site to try and upload an image and I get no error messages, as if the image had uploaded just fine. But I get a broken image icon instead of the usual preview, and if I follow the image link I get a ‘page not found (404)’. The URL path is were the image should have been uploaded to, but checking the FTP folder the image is not there.

All folders have 755 permissions (all files are 644). I tried changing the folders’ to 777 (just for test) but to no avail. I still get a broken image icon and no image uploads to the actual folder.

The only place I can see the image is if I go to the edit option (and click edit again) I can see it in the editing textarea. And if I open that same image in a new tab the URL is something like mysite.com/blog/wp-admin/admin-ajax.php?action=imgedit-preview[…].

I searched some questions before posting, but most were solved changing permissions back and forth, or it was an issue between user and owner permissions. I tried the first and didn’t work, and the second doesn’t really apply to me, I think, because the first time I did the install the site was working fine under the same user as now. The problem is pretty much the same as this question, except I have no .htaccess file in the way.

Does anyone have an idea of what the problem could be?

3 s
3

I found the problem. In settings > media the folder for uploads was actually pointing to a different path. Once I redirected it to wp-content/uploads it all worked.

Leave a Comment