{"id":13697849,"url":"https://github.com/wp-cli/import-command","last_synced_at":"2026-04-01T22:27:37.695Z","repository":{"id":18125434,"uuid":"83433562","full_name":"wp-cli/import-command","owner":"wp-cli","description":"Imports content from a given WXR file.","archived":false,"fork":false,"pushed_at":"2026-03-20T23:00:18.000Z","size":8505,"stargazers_count":21,"open_issues_count":2,"forks_count":23,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-21T01:41:17.796Z","etag":null,"topics":["cli","hacktoberfest","import","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2017-02-28T13:07:49.000Z","updated_at":"2026-03-20T23:00:22.000Z","dependencies_parsed_at":"2026-03-12T10:00:21.801Z","dependency_job_id":null,"html_url":"https://github.com/wp-cli/import-command","commit_stats":{"total_commits":431,"total_committers":47,"mean_commits":9.170212765957446,"dds":0.6983758700696056,"last_synced_commit":"7aafa54bf7c122dfbd777b5e5fbb5907af38e504"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/wp-cli/import-command","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fimport-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fimport-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fimport-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fimport-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-cli","download_url":"https://codeload.github.com/wp-cli/import-command/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-cli%2Fimport-command/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","hacktoberfest","import","wordpress","wp-cli","wp-cli-package"],"created_at":"2024-08-02T18:01:03.838Z","updated_at":"2026-04-01T22:27:37.686Z","avatar_url":"https://github.com/wp-cli.png","language":"PHP","readme":"wp-cli/import-command\n=====================\n\nImports content from a given WXR file.\n\n[![Testing](https://github.com/wp-cli/import-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/import-command/actions/workflows/testing.yml) [![Code Coverage](https://codecov.io/gh/wp-cli/import-command/branch/main/graph/badge.svg)](https://codecov.io/gh/wp-cli/import-command/tree/main)\n\nQuick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)\n\n## Using\n\n~~~\nwp import \u003cfile\u003e... --authors=\u003cauthors\u003e [--skip=\u003cdata-type\u003e] [--rewrite_urls] [--importer=\u003cimporter\u003e]\n~~~\n\nProvides a command line interface to the WordPress Importer plugin, for\nperforming data migrations.\n\nUse `define( 'IMPORT_DEBUG', true );` for more verbosity during importing.\n\n**OPTIONS**\n\n\t\u003cfile\u003e...\n\t\tPath to one or more valid WXR files for importing. Directories are also accepted.\n\t\tA URL to a WXR file is also accepted. Use '-' to import from STDIN.\n\n\t--authors=\u003cauthors\u003e\n\t\tHow the author mapping should be handled. Options are 'create', 'mapping.csv', or 'skip'. The first will create any non-existent users from the WXR file. The second will read author mapping associations from a CSV, or create a CSV for editing if the file path doesn't exist. The CSV requires two columns, and a header row like \"old_user_login,new_user_login\". The last option will skip any author mapping.\n\n\t[--skip=\u003cdata-type\u003e]\n\t\tSkip importing specific data. Supported options are: 'attachment' and 'image_resize' (skip time-consuming thumbnail generation).\n\n\t[--rewrite_urls]\n\t\tChange all imported URLs that currently link to the previous site so that they now link to this site\n\t\tRequires WordPress Importer version 0.9.1 or newer.\n\n\t[--importer=\u003cimporter\u003e]\n\t\tUse a custom importer class instead of the default WP_Import. The class must exist and be a subclass of WP_Import.\n\n**EXAMPLES**\n\n    # Import content from a WXR file\n    $ wp import example.wordpress.2016-06-21.xml --authors=create\n    Starting the import process...\n    Processing post #1 (\"Hello world!\") (post_type: post)\n    -- 1 of 1\n    -- Tue, 21 Jun 2016 05:31:12 +0000\n    -- Imported post as post_id #1\n    Success: Finished importing from 'example.wordpress.2016-06-21.xml' file.\n\n    # Import content from a WXR file via HTTP\n    $ wp import https://raw.githubusercontent.com/WordPress/theme-test-data/refs/heads/master/theme-preview.xml --authors=skip\n    Starting the import process...\n    Downloading 'https://raw.githubusercontent.com/WordPress/theme-test-data/refs/heads/master/theme-preview.xml'...\n    Success: Finished importing from 'https://raw.githubusercontent.com/WordPress/theme-test-data/refs/heads/master/theme-preview.xml' file.\n\n    # Import content from STDIN\n    $ wp export --stdout | wp import - --authors=skip\n    Starting the import process...\n    Success: Finished importing from 'STDIN' file.\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/import-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/import-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/import-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/import-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### License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\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":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-cli%2Fimport-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-cli%2Fimport-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-cli%2Fimport-command/lists"}