Skip Navigation

[Resolved] Bulk import media files with metadatas

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 4 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1520201

Hi,
I am trying to rebuild a website that once was based on another CMS.
In my database, I have 6000 files (pdf, jpg, docx, rtf) that I need to import and associate with posts.
One way to doing this seem to import the posts with a custom "files" field including the list of files URLs.
Except by doing this I lose all metadatas on my original files (such as title and descriptions, which are needed for SEO purpose).
What other way would you suggest to import media files ?
On this thread https://toolset.com/forums/topic/bulk-import-media-files-with-metadatas/ you recommended a plugin that I've bought, installed, tried, and contacted their support for help ; but they answered they only support images...
Thank you.

#1521201

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I'm afraid I don't know which import plugins are capable of importing media other than images, such as .docx and .rtf files, you would need to consult with the plugin authors to clarify what file formats can be imported.

WordPress does allow you to add such files to the Media Library, so the import plugins should support them, but I can't say whether they will or not.

When you add an image (or file) to the Media Library, WordPress creates an "attachment" post, which also holds the metadata such as the title and description.

So, if you want to import such metadata, then you must import the files into the Media Library.

When you have a Types image or file custom field (as would be required for those formats) and edit a post and add a file to the field, the file itself is added to the Media Library and the corresponding attachment post sets a value for the post_parent field to the ID of the post the file is attached to, and then an entry in wp_postmeta is also added (for the post itself, not the media attachment post) which stores the location of the file.

I'm not sure there is a one-click solution if the plugin you bought cannot handle different file formats available in the Media Library, and you may need a customised solution that additionally runs some code for each imported record, such as is available with WP All Import.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.