wp-cli / export-command

Exports WordPress content to a WXR file.
MIT License
12 stars 27 forks source link

Lite export #72

Open Mte90 opened 3 years ago

Mte90 commented 3 years ago

Feature Request

Describe your use case and the problem you are facing

wp export post__in="196219,213336,210457,208635,209995"

If I run this I am getting the full list of authors and categories but I just want the articles. As I can see also that the author is not exported in any article.

Describe the solution you'd like

Just export what I am asking for and not everything.

pawelkmpt commented 2 years ago

I just tried to export one post from a huge site. I ended up with 2 files having together around 1 milion rows. Content I asked for was around 400 lines. At the end of the second file.

Export process used 2GB of memory. This can't work like that.

pawelkmpt commented 2 years ago

This helps a bit.

wp export --post__in=1234 --author=$(wp post get 1234 --field=post_author) --post_type=$(wp post get 1234 --field=post_type)
danielbachhuber commented 12 months ago

We could add --skip_authors and --skip_terms as additional flags.

nir-riskified commented 7 months ago

Hey @danielbachhuber - Any update on that? --slip_authors flag could be very nice.

danielbachhuber commented 7 months ago

No updates. Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.