PHPackages                             wpsh/wp-cli-replicator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. wpsh/wp-cli-replicator

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

wpsh/wp-cli-replicator
======================

0.1.1(7y ago)3584.2k↓57.4%4[2 issues](https://github.com/wpsh/wp-cli-replicator/issues)[1 PRs](https://github.com/wpsh/wp-cli-replicator/pulls)MITPHP

Since Aug 31Pushed 7y ago3 watchersCompare

[ Source](https://github.com/wpsh/wp-cli-replicator)[ Packagist](https://packagist.org/packages/wpsh/wp-cli-replicator)[ Docs](https://wpsh.org/wp-cli-replicator)[ RSS](/packages/wpsh-wp-cli-replicator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

WP Site Replicator
==================

[](#wp-site-replicator)

**Quickly create replicas of large production websites from WordPress eXtended RSS (WXR) export files.**

This command relies on writing directly to the WP database via WP DB API so both post and term tables should be empty.

Install
-------

[](#install)

Install it as a [WP CLI package](https://developer.wordpress.org/cli/commands/package/install/):

```
wp package install wpsh/wp-cli-replicator

```

Usage
-----

[](#usage)

### Export Content

[](#export-content)

Export content from the source site:

1. 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.
2. 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.

### Prepare Import

[](#prepare-import)

1. Parse the exported [WordPress eXtended RSS or WXR](https://codex.wordpress.org/Tools_Export_Screen) into JSON files for site users, terms and posts:

    ```
    wp replicator parse-wxr path/to/wxr/directory

    ```

    where `path/to/wxr/directory` is the path to the directory with all the XML files.

    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`.

### Import Content

[](#import-content)

Please note that you may need to specify `--url` for all commands if you're running WordPress multisite.

1. Empty the site content where you want to import the content:

    ```
    wp site empty --yes

    ```
2. Import options:

    ```
    wp replicator import-options "path/to/options.json"

    ```

    where `path/to/options.json` is the path to the exported options.
3. Import users:

    ```
    wp replicator import-users "path/to/users.json"

    ```

    where `path/to/users.json` is the path the user list generated from the XML export.

    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.
4. Import taxonomies and terms:

    ```
    wp replicator import-terms "path/to/terms.json"

    ```

    where `path/to/terms.json` is the path the term list generated from the XML export.
5. Import posts:

    ```
    wp replicator import-posts "path/to/json"

    ```

    where `path/to/json` is the path to the directory with all `post-*.json` files.

Credits
-------

[](#credits)

Created by [Kaspars Dambis](https://kaspars.net).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~299 days

Total

2

Last Release

2563d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/169055?v=4)[Kaspars Dambis](/maintainers/kasparsd)[@kasparsd](https://github.com/kasparsd)

---

Top Contributors

[![kasparsd](https://avatars.githubusercontent.com/u/169055?v=4)](https://github.com/kasparsd "kasparsd (76 commits)")

---

Tags

wordpresswp-cliwp-cli-packagewordpresswp-cliwp-cli-package

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/wpsh-wp-cli-replicator/health.svg)

```
[![Health](https://phpackages.com/badges/wpsh-wp-cli-replicator/health.svg)](https://phpackages.com/packages/wpsh-wp-cli-replicator)
```

###  Alternatives

[wp-cli/core-command

Downloads, installs, updates, and manages a WordPress installation.

5211.3M30](/packages/wp-cli-core-command)[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1069.8M84](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1728.4M22](/packages/wp-cli-scaffold-command)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

909.9M83](/packages/wp-cli-extension-command)[wp-cli/checksum-command

Verifies file integrity by comparing to published checksums.

338.3M14](/packages/wp-cli-checksum-command)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
