I am trying to migrate my site from shared hosting to the digital ocean. I have uploaded wp-content and my site is over 3 years old. Now when I am checking into the media on the dashboard. Files aren't showing.
Ideally, all the months should be visible but as you can see in the image only selected no of months are shown. How can I get the Wordpress to show all the months and images?
I am trying to migrate my site from shared hosting to the digital ocean. I have uploaded wp-content and my site is over 3 years old. Now when I am checking into the media on the dashboard. Files aren't showing.
Ideally, all the months should be visible but as you can see in the image only selected no of months are shown. How can I get the Wordpress to show all the months and images?
Share Improve this question edited Apr 9, 2020 at 17:42 Tom J Nowell♦ 61.1k7 gold badges79 silver badges148 bronze badges asked Apr 9, 2020 at 17:05 Yogita Suresh TalujaYogita Suresh Taluja 1 3 |1 Answer
Reset to default 0There's a really basic but broken assumption here:
The media library does not display files in wp-content
The media library is the same as the posts or pages screen, it's a list of posts that just shows the posts a little differently.
When you upload a file to WP, it creates a post of type attachment
, and that's what's shown in the media library. Otherwise WP would have nowhere to store attachment meta, titles, descriptions, comments, etc.
In fact attachments have their own theme templates and permalinks, for example here's the attachment page for an image I uploaded to my own site:
https://tomjn/2017/08/31/where-gutenberg-leads-us/screen-shot-2017-08-31-at-14-13-54/
Attachments can have taxonomies, post meta, comments, etc
If the media library was a file browser, then every resized image would show up in the media library too.
So when you state:
Files aren't showing.
That's incorrect, the media library does not show files. It shows attachment
posts.
So why is it that only some of your media library shows up? Because not all of the attachment
posts made it across in the migration. The presence of the files is irrelevant. If all the posts made it across but files were missing, they'd still show but with broken images that lead to 404s
attachment
– Tom J Nowell ♦ Commented Apr 9, 2020 at 17:42wp-content
, that doesn't mean it would show in the media library – Tom J Nowell ♦ Commented Apr 10, 2020 at 10:13