Importing media | WordPress.org

[ad_1]

The media files are in the upload directory – you have recognised that correctly. In order for WordPress to be able to refer to them, there must also be a database entry as an attachment for each original file. Only if this is there can you see the file again in the backend and use the files for any editorial work.

To reintegrate the files into the database, you would have to import them in some form. This is possible, for example, via WP CLI:

You can also try a plugin like this one:

Note that after importing the files, you have to insert them into your content again. With all that you have done, it would probably be easier to import a backup.

haha I’m an idiot. I found the problem. It was because of how I had dumped the database. I found the data I was looking for in the SQL output.

Thanks for that. The posts all populate the images correctly when rendered in the client browser but I sorta suspect that is because I haven’t gone in and touched any of the posts other than importing them into the posts database table. That’s why I was hoping I could find the metadata in the database somewhere. But when I look through a previous db dump I don’t find the file names referenced anywhere so I assume it’s not stored in the databas. I’m loathe to do a complete restore of a backup because there is a ton of junk in it.

  • This reply was modified 34 minutes ago by iamthegorf.
  • This reply was modified 27 minutes ago by iamthegorf.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer