{"id":14955129,"url":"https://github.com/wp-cli/export-command","last_synced_at":"2025-04-13T04:59:33.775Z","repository":{"id":45445842,"uuid":"84380836","full_name":"wp-cli/export-command","owner":"wp-cli","description":"Exports WordPress content to a WXR file.","archived":false,"fork":false,"pushed_at":"2025-04-02T15:29:10.000Z","size":8601,"stargazers_count":12,"open_issues_count":8,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-13T04:59:26.306Z","etag":null,"topics":["cli","export","hacktoberfest","wordpress","wp-cli","wp-cli-package"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wp-cli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-09T00:46:14.000Z","updated_at":"2025-04-02T15:29:13.000Z","dependencies_parsed_at":"2024-11-15T02:21:25.708Z","dependency_job_id":"a365e2ce-70bb-4b75-9e53-c504c987810e","html_url":"https://github.com/wp-cli/export-command","commit_stats":{"total_commits":566,"total_committers":61,"mean_commits":9.278688524590164,"dds":0.7226148409893993,"last_synced_commit":"eeafa03095b80d2648d1a67b00c688be9d418aff"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fexport-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fexport-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fexport-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fexport-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-cli","download_url":"https://codeload.github.com/wp-cli/export-command/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665757,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","export","hacktoberfest","wordpress","wp-cli","wp-cli-package"],"created_at":"2024-09-24T13:10:33.606Z","updated_at":"2025-04-13T04:59:33.753Z","avatar_url":"https://github.com/wp-cli.png","language":"PHP","readme":"wp-cli/export-command\n=====================\n\nExports WordPress content to a WXR file.\n\n[![Testing](https://github.com/wp-cli/export-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/export-command/actions/workflows/testing.yml)\n\nQuick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)\n\n## Using\n\n~~~\nwp export [--dir=\u003cdirname\u003e] [--stdout] [--skip_comments] [--max_file_size=\u003cMB\u003e] [--filename_format=\u003cformat\u003e] [--include_once=\u003cbefore_posts\u003e] [--allow_orphan_terms] [--start_date=\u003cdate\u003e] [--end_date=\u003cdate\u003e] [--post_type=\u003cpost-type\u003e] [--post_type__not_in=\u003cpost-type\u003e] [--post__in=\u003cpid\u003e] [--with_attachments] [--start_id=\u003cpid\u003e] [--max_num_posts=\u003cnum\u003e] [--author=\u003cauthor\u003e] [--category=\u003cname|id\u003e] [--post_status=\u003cstatus\u003e]\n~~~\n\nGenerates one or more WXR files containing authors, terms, posts,\ncomments, and attachments. WXR files do not include site configuration\n(options) or the attachment files themselves.\n\n**OPTIONS**\n\n\t[--dir=\u003cdirname\u003e]\n\t\tFull path to directory where WXR export files should be stored. Defaults\n\t\tto current working directory.\n\n\t[--stdout]\n\t\tOutput the whole XML using standard output (incompatible with --dir=)\n\n\t[--skip_comments]\n\t\tDon't include comments in the WXR export file.\n\n\t[--max_file_size=\u003cMB\u003e]\n\t\tA single export file should have this many megabytes. -1 for unlimited.\n\t\t---\n\t\tdefault: 15\n\t\t---\n\n\t[--filename_format=\u003cformat\u003e]\n\t\tUse a custom format for export filenames. Defaults to '{site}.wordpress.{date}.{n}.xml'.\n\n\t[--include_once=\u003cbefore_posts\u003e]\n\t\tInclude specified export section only in the first export file. Valid options\n\t\tare categories, tags, nav_menu_items, custom_taxonomies_terms. Separate multiple\n\t\tsections with a comma. Defaults to none.\n\n\t[--allow_orphan_terms]\n\t\tExport orphaned terms with `parent=0`, instead of throwing an exception.\n\n**FILTERS**\n\n\t[--start_date=\u003cdate\u003e]\n\t\tExport only posts published after this date, in format YYYY-MM-DD.\n\n\t[--end_date=\u003cdate\u003e]\n\t\tExport only posts published before this date, in format YYYY-MM-DD.\n\n\t[--post_type=\u003cpost-type\u003e]\n\t\tExport only posts with this post_type. Separate multiple post types with a\n\t\tcomma.\n\t\t---\n\t\tdefault: any\n\t\t---\n\n\t[--post_type__not_in=\u003cpost-type\u003e]\n\t\tExport all post types except those identified. Separate multiple post types\n\t\twith a comma. Defaults to none.\n\n\t[--post__in=\u003cpid\u003e]\n\t\tExport all posts specified as a comma-separated or space-separated list of IDs.\n\t\tPost's attachments won't be exported unless --with_attachments is specified.\n\n\t[--with_attachments]\n\t\tForce including attachments in case --post__in has been specified.\n\n\t[--start_id=\u003cpid\u003e]\n\t\tExport only posts with IDs greater than or equal to this post ID.\n\n\t[--max_num_posts=\u003cnum\u003e]\n\t\tExport no more than \u003cnum\u003e posts (excluding attachments).\n\n\t[--author=\u003cauthor\u003e]\n\t\tExport only posts by this author. Can be either user login or user ID.\n\n\t[--category=\u003cname|id\u003e]\n\t\tExport only posts in this category.\n\n\t[--post_status=\u003cstatus\u003e]\n\t\tExport only posts with this status.\n\n**EXAMPLES**\n\n    # Export posts published by the user between given start and end date\n    $ wp export --dir=/tmp/ --user=admin --post_type=post --start_date=2011-01-01 --end_date=2011-12-31\n    Starting export process...\n    Writing to file /tmp/staging.wordpress.2016-05-24.000.xml\n    Success: All done with export.\n\n    # Export posts by IDs\n    $ wp export --dir=/tmp/ --post__in=123,124,125\n    Starting export process...\n    Writing to file /tmp/staging.wordpress.2016-05-24.000.xml\n    Success: All done with export.\n\n    # Export a random subset of content\n    $ wp export --post__in=\"$(wp post list --post_type=post --orderby=rand --posts_per_page=8 --format=ids)\"\n    Starting export process...\n    Writing to file /var/www/example.com/public_html/staging.wordpress.2016-05-24.000.xml\n    Success: All done with export.\n\n## Installing\n\nThis package is included with WP-CLI itself, no additional installation necessary.\n\nTo install the latest version of this package over what's included in WP-CLI, run:\n\n    wp package install git@github.com:wp-cli/export-command.git\n\n## Contributing\n\nWe appreciate you taking the initiative to contribute to this project.\n\nContributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.\n\nFor a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.\n\n### Reporting a bug\n\nThink you’ve found a bug? We’d love for you to help us get it fixed.\n\nBefore you create a new issue, you should [search existing issues](https://github.com/wp-cli/export-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.\n\nOnce you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/export-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).\n\n### Creating a pull request\n\nWant to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/export-command/issues/new) to discuss whether the feature is a good fit for the project.\n\nOnce you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See \"[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)\" for details specific to working on this package locally.\n\n## Support\n\nGitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support\n\n\n*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-cli%2Fexport-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-cli%2Fexport-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-cli%2Fexport-command/lists"}