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?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
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
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
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.
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.