Media files get added to the media library when you upload the files via WordPress.
If the files are placed there via FTP WordPress won’t know about them.
There are some plugins that may help you to populate the media library by scanning the upload folders.
Have a look at https://wordpress.org/plugins/media-from-ftp/ for instance. (Haven’t tried it myself, so can’t guarantee it will fit your need.)
EditAdd: or https://wordpress.org/plugins/add-from-server/
Thread Starter
Ian
(@ian_moore)
Thank you for your advice. I had already tried Add from Server but without success. Likewise, Media from FTP. Both came up with errors, as did Thumbnail Cleaner which might suggest there are issues deeper within.
Will a new file that you upload via the web interface register correctly?
I still have no clue what to do else, but this piece of input might be useful for someone else, more knowledgeable.
Thread Starter
Ian
(@ian_moore)
I just loaded a new image to the media library, it uploaded, it’s there on the server in /2017/07/ but still the media library is empty! Media categories has retained all it’s information, including how many images are in each category but click on their gallery and it is empty. Any clues?
You can try to reinstall WordPress (there’s a button for that on the updates page), just in case some file is damaged.
Next I’d ask you if you’ve tried to temporarily deactivate any plugins and do a new upload. (Perhaps even temporarily move to the standard theme twenty-seventeen.)
Also: Did you migrate any data? How did you do that? Do you still have the data saved?
^^ what he said. Additionally…
Could be a permissions issue. On most ‘nix servers, folders should be 755 and files 644. Or a security module running on the server. Also check .htaccess files (if Apache) for any restrictions.
If you enter a correct image URL into your browser, does the image load? If so, go back to the media library, then check your browser’s error console for JS errors.
Check the most recent access logs if you can. The media library requests should be listed near the bottom if you just tried. Are the URLs correct or are they all going to 2017/07/? If 2017/07, somehow the file attachment data got inappropriately updated on import. Verify via phpMyAdmin in the postmeta table.
-
This reply was modified 8 years, 9 months ago by
bcworkz. Reason: another thought
Thread Starter
Ian
(@ian_moore)
Permissions vary but mostly 775 and 660. The host has corrected them once, though I’m not sure for the whole site. Definitely no consistency throughout.
Correct image URLs ‘do’ load images in my browser.
Error console was bringing up errors for one plugin, “Enhanced Media Library” – deactivated it but no change. Also error in load-scripts.php but don’t know what I’m looking at.
There is an htaccess file that reads thus:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteRule ^_security /wp-content/plugins/password-protect-wordpress/certificate.txt [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The .htaccess looks standard. Only the …security… is non-standard, but shouldn’t really disturb us here.
Please post all errors that you see in the console.