最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Media library storing files in uploads not folders within in uploads

programmeradmin3浏览0评论

I am working on a site rebuild, I need to preserve about 100 blog posts that include images. I was having issues exporting the images and I decided to just download them via FTP. However, I found a strange file structure in the uploads on this particular site. All of the files are being dumped in uploads, there are no nested directories of years and months.

Typically I would expect an image url structure like this: /wp-content/uploads/2022/02/sheffler.jpg

However, on this site it looks like this: /wp-content/uploads/phyllispalmer-web.jpg

When I dumped all the files into the uploads folder none of them show up in the media library, but they are working in the posts so that's good.

I'm wondering how the previous developer got this to work though? and for what reason, if any, this would be advantageous?

Ultimately, it would be nice for the client if they could manage the media library through the dashboard.

I did take a look at this post, it mentioned the wp-config file, I checked the wp-config file on the existing site and there aren't any modifications to the config file in relation to media file paths.

Any ideas would be appreciated.

Thanks.

I am working on a site rebuild, I need to preserve about 100 blog posts that include images. I was having issues exporting the images and I decided to just download them via FTP. However, I found a strange file structure in the uploads on this particular site. All of the files are being dumped in uploads, there are no nested directories of years and months.

Typically I would expect an image url structure like this: /wp-content/uploads/2022/02/sheffler.jpg

However, on this site it looks like this: /wp-content/uploads/phyllispalmer-web.jpg

When I dumped all the files into the uploads folder none of them show up in the media library, but they are working in the posts so that's good.

I'm wondering how the previous developer got this to work though? and for what reason, if any, this would be advantageous?

Ultimately, it would be nice for the client if they could manage the media library through the dashboard.

I did take a look at this post, it mentioned the wp-config file, I checked the wp-config file on the existing site and there aren't any modifications to the config file in relation to media file paths.

Any ideas would be appreciated.

Thanks.

Share Improve this question asked Feb 4, 2022 at 21:18 grzybowski1911grzybowski1911 898 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

At the bottom of the Settings >> Media page(/wp-admin/options-media.php) you can choose to start organizing uploads by date or not. Not having the date folders for uploaded files makes it much easier to move media libraries to new sites like you're doing. That previous dev set you up good.

If you tried to upload all the images via the media library so they could be managed there, they would all be stored in a different date folder than the old blog posts are linking too, so even though they are managed in the media library, all the old blog posts would have broken images.

If you turn off that setting for date uploads, then you could bulk upload all the images using the media library, and the images will be managed in the media library, and the blog post images should still hook up properly if they have urls like yourdomain.com/wp-content/uploads/some-beautiful-image.png.

发布评论

评论列表(0)

  1. 暂无评论