{"id":18399040,"url":"https://github.com/wpsh/wp-cli-replicator","last_synced_at":"2025-04-07T05:34:03.225Z","repository":{"id":57082338,"uuid":"109671971","full_name":"wpsh/wp-cli-replicator","owner":"wpsh","description":"Replicate production websites from WordPress eXtended RSS (WXR) export files","archived":false,"fork":false,"pushed_at":"2019-06-26T18:05:52.000Z","size":53,"stargazers_count":34,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-04T02:07:14.154Z","etag":null,"topics":["wordpress","wp-cli","wp-cli-package"],"latest_commit_sha":null,"homepage":"https://wpsh.org/wp-cli-replicator","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/wpsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-06T09:09:40.000Z","updated_at":"2024-08-04T02:07:14.155Z","dependencies_parsed_at":"2022-08-24T14:58:19.983Z","dependency_job_id":null,"html_url":"https://github.com/wpsh/wp-cli-replicator","commit_stats":null,"previous_names":["kasparsd/wp-cli-replicator"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpsh%2Fwp-cli-replicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpsh%2Fwp-cli-replicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpsh%2Fwp-cli-replicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpsh%2Fwp-cli-replicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpsh","download_url":"https://codeload.github.com/wpsh/wp-cli-replicator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601378,"owners_count":20964861,"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":["wordpress","wp-cli","wp-cli-package"],"created_at":"2024-11-06T02:25:33.581Z","updated_at":"2025-04-07T05:33:58.216Z","avatar_url":"https://github.com/wpsh.png","language":"PHP","readme":"# WP Site Replicator\n\n**Quickly create replicas of large production websites from WordPress eXtended RSS (WXR) export files.**\n\nThis command relies on writing directly to the WP database via WP DB API so both post and term tables should be empty.\n\n## Install\n\nInstall it as a [WP CLI package](https://developer.wordpress.org/cli/commands/package/install/):\n\n    wp package install wpsh/wp-cli-replicator\n\n\n## Usage\n\n### Export Content\n\nExport content from the source site:\n\n1. Use the [WordPress Importer](https://wordpress.org/plugins/wordpress-importer/) plugin or the [`wp export` command](https://developer.wordpress.org/cli/commands/export/) to export the site content.\n\n2. Use the [WP Options Importer](https://wordpress.org/plugins/options-importer/) plugin to export the site options. The output should be a single `options.json` file.\n\n\n### Prepare Import\n\n1. Parse the exported [WordPress eXtended RSS or WXR](https://codex.wordpress.org/Tools_Export_Screen) into JSON files for site users, terms and posts:\n\n\t   wp replicator parse-wxr path/to/wxr/directory\n\n   where `path/to/wxr/directory` is the path to the directory with all the XML files.\n\n   All XML files `path/to/wxr/files/*.xml` are parsed and stored in the `path/to/wxr/directory/json` directory -- `users.json`, `terms.json` and `posts-*.json`.\n\n\n### Import Content\n\nPlease note that you may need to specify `--url` for all commands if you're running WordPress multisite.\n\n1. Empty the site content where you want to import the content:\n\n\t   wp site empty --yes\n\n2. Import options:\n\n\t   wp replicator import-options \"path/to/options.json\"\n\n   where `path/to/options.json` is the path to the exported options.\n\n3. Import users:\n\n\t   wp replicator import-users \"path/to/users.json\"\n\n   where `path/to/users.json` is the path the user list generated from the XML export.\n\n   All existing users with the same login name will be deleted and new users created with a random password because WordPress export doesn't include the passwords. All users will need to reset their passwords. Use `wp user update USERNAME --user_pass=\"YOURNEWPASSWORD\"` to update a password for a specific user.\n\n4. Import taxonomies and terms:\n\n\t   wp replicator import-terms \"path/to/terms.json\"\n\n   where `path/to/terms.json` is the path the term list generated from the XML export.\n\n5. Import posts:\n\n\t   wp replicator import-posts \"path/to/json\"\n\n   where `path/to/json` is the path to the directory with all `post-*.json` files.\n\n\n## Credits\n\nCreated by [Kaspars Dambis](https://kaspars.net).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpsh%2Fwp-cli-replicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpsh%2Fwp-cli-replicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpsh%2Fwp-cli-replicator/lists"}