1

Exporting posts with featured images without downloading them.

I work with a site that has 10000 media in a blob and nothing is allocated in the uploads folder.

How do I export the posts without having to download the media to the upload folder?

1

This is a very late response but hopefully, this helps someone.

As Narek had mentioned, you normally want to use the WordPress Importer.

Do keep in mind many people run into exhausted PHP memory issues on larger exports. I know you had mentioned 10,000 assets in the media library. You may increase the memory limit by adding the constants in this article to the wp-config.php to adjust them. Do keep in mind your web host may limit this from a higher level though in which case you may not be able to increase it past a certain point.

There are other methods of doing this over the CLI to avoid this issue.

First, you could copy over all of your assets from the other location to the new one using rsync or scp on the CLI after SSHing into your environment.

Then, one of the best methods is probably doing the MySQL export via WP-CLI if your environment allows for it and only grabbing the posts of type attachment, and associated post meta, although I've never used it yet. Check out this article. You could also use this method to run the import as well per this article.

If your server doesn't support WP-CLI, you could use this method which takes advantage of mysql and mysqldump.

If you're good with PHP/MySQL, you could also consider writing a migrate script to do it in chunks (to avoid the memory issues) if none of these options work for you. There are also scripts/plugins out there already built (although I don't personally want to vouch for any).

As you can probably tell there is no "one" answer to data migration and it's highly dependent on the environments you're working with.

0

You can export the demo data with WordPress Importer. Here's what you need to do:

1.Login to WordPress admin

2.Go into admin panel > Tools > Import

3.If you haven’t already, you will be prompted to install the WordPress Importer free WordPress plugin. Just install it like you would any other plugin, and after you activate it return to this screen.

0
  1. First, download WordPress Importer Plugin.
  2. Login to WordPress admin
  3. Go into admin panel > Tools > Import

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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