Support » Everything else WordPress » export media (not just URLs)?

  • I used Extra>>Export>>Media trying to export all media from a WP-installation. I was expecting a large file/zip because of the many images on the site. However, I got one 288 kB XML file, containing only URLs to the original location of the media.

    How can I export all media, so I can import them again in a fresh WP-site?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The media files are in a folder on your server, at wp-content/uploads. Just copy this folder and transfer it wherever you want.

    You may also use a plugin like this: https://wordpress.org/plugins/export-media-library/

    Thread Starter auitje

    (@auitje)

    Check – that was easy 🙂 Thanks for your quick response!

    Is it equally easy to now change all URLs in all posts to refer to the copied content, rather than to the old media folder?

    Thread Starter auitje

    (@auitje)

    Oh, in addition to the question above about chaging all URLs, I now see that though I copied all media to the content/uploads directory, I cannot see them in WP when I go to Media. Do I need to do something more?

    Thread Starter auitje

    (@auitje)

    @gappiah the solution of just copying the directory with media files does not work. Browsing in this forum and elsewhere, I read about databases that need to be updated. I see all kinds of SQL-queries that I do not understand.

    I decided to remove the folder and start looking for a plugin that properly exports all media so that it can be imported again.

    If you have suggestions for such plugins,… I’d welcome them!

    @gappiah the solution of just copying the directory with media files does not work. Browsing in this forum and elsewhere, I read about databases that need to be updated. I see all kinds of SQL-queries that I do not understand.

    It surely does work, as per the question you asked. But maybe not what you expect.

    So the problem may be in the specific question you asked.

    First, some background info:

    When you upload a file in WordPress, certain metadata about the file is stored in the WordPress database. If you use the file (say image) in a post, additional metadata are added.

    Part of this metadata is what makes the files browsable in the Media library in the WordPress dashboard.

    What this means is that the files you upload from the WordPress dashboard are linked to the WordPress database of the specific WordPress site.

    What this also means is that… even on your current WordPress site… if you use, say, FTP, to upload files to the WordPress uploads folder, WordPress will not be “aware” of these files… therefore they will not appear in the Media library.

    Now, let’s get back to your ORIGINAL question:

    How can I export all media, so I can import them again in a fresh WP-site?

    My understanding was that you wanted just the media files to use on a new (and different) WordPress site. This is exactly what the plugin I recommended does.

    But, as noted earlier, because we’re dealing with a new and different WordPress site/database that’s not aware of the files… if you simply upload these files via FTP to your uploads folder, the files will NOT appear in the Media library.

    There are solutions to this specific problem, but I’m not entirely sure if this is the problem you’re trying to solve or not.

    So kindly clarify this for me:

    Is this “fresh WP-site” a new and different WordPress site you’re building (ie you’re not using the existing site’s content/database on the new site)?

    Or, are you simply migrating the existing site’s content/database and files to the new site?

    What are you really doing?

    Standing by.

    Thread Starter auitje

    (@auitje)

    Thanks, @gappiah for the longer explanation and apologies for my unclear initial question. Yes, I intended to reuse all media from an existing WP-installation on a new site.

    In the meanwhile, I might have changed my thought. For now, I am going to try an work on the old site – maybe I can revamp it in situ. If not, I will come back to this thread and possibly try the plugin you recommended.

    Thanks again for standing by!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.