0

I have an old website with several GBs of media data. i want to export the media files with wordpress export / import tool to my new website. Wordpress gives me a 10mb .xml file out of the several GBs media data. I understand that WordPress Import/Export feature does not physically move the media files themselves. it creates some sort of mapping.

my concern is that the media files remain hosted on the old site and are accessed from there, even though they appear to be on the new site. so if i deleted the old side i lose all the media data.

I just need some clarifications please.

1 Answer 1

0

Does WordPress import export tool keeps the file hosted on the old website?

No, the import/export tool creates a WXR file for posts/terms, WXR exports include the attachments from the database, but they do not include the files themselves.

When you import the WXR though, it will ask if you want to download the assets from the original server.

Since you've stated you have multiple gigabytes of assets, it's almost guaranteed that this will take longer than the maximum PHP execution time and fail unless you do it via WP CLI, or break your WXR into multiple smaller chunks.

This is of course not taking into consideration alternative methods of migrating data, such as raw SQL, downloading media via FTP and uploading it, search replace, etc ( I'd advise asking a new follow up question about each of those ).

my concern is that the media files remain hosted on the old site and are accessed from there, even though they appear to be on the new site. so if i deleted the old side i lose all the media data.

Correct. If you delete your old site without migrating media, all your media is destroyed.

3
  • your reply really helped, Thank you .. specially with the WP-CLI hint, becuase i was actually facing this maximum PHP execution time, right now and was about to search for another solution. 🙏
    – Khaled
    Mar 27 at 14:23
  • if you cannot use SSH to get access to run WP CLI on your host, you can download your site and its database locally and run WP CLI there, then upload the files and replace the live database. This gives you the added bonus of having a live copy of your site to do checks and confirmations on beforeand
    – Tom J Nowell
    Mar 27 at 14:31
  • That's a great suggestion, Thank you!
    – Khaled
    Mar 27 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.