All Projects → wpsh → Wp Cli Replicator

wpsh / Wp Cli Replicator

Licence: mit
Replicate production websites from WordPress eXtended RSS (WXR) export files

Projects that are alternatives of or similar to Wp Cli Replicator

Trellis
WordPress LEMP stack with PHP 8.0, Composer, WP-CLI and more
Stars: ✭ 2,295 (+6650%)
Mutual labels:  wp-cli, wordpress
Airplane Mode
Disables external data calls and loading for working on a purely local (i.e. no internet connection) WordPress site
Stars: ✭ 441 (+1197.06%)
Mutual labels:  wp-cli, wordpress
Wplib Box
The Best Local Dev Server for WordPress Developers
Stars: ✭ 204 (+500%)
Mutual labels:  wp-cli, wordpress
Awesome Wp Cli
A curated list of packages and resources for WP-CLI, the command-line interface for WordPress.
Stars: ✭ 129 (+279.41%)
Mutual labels:  wp-cli, wordpress
Wordpress Multi Env Config
WordPress Multi-Environment Config
Stars: ✭ 743 (+2085.29%)
Mutual labels:  wp-cli, wordpress
Image Optimize Command
Easily optimize images using WP CLI
Stars: ✭ 138 (+305.88%)
Mutual labels:  wp-cli, wordpress
Cavalcade
A better wp-cron. Horizontally scalable, works perfectly with multisite.
Stars: ✭ 412 (+1111.76%)
Mutual labels:  wp-cli, wordpress
Ext
WP-CLI command which checks the existence of PHP extensions needed to run WordPress.
Stars: ✭ 69 (+102.94%)
Mutual labels:  wp-cli, wordpress
Wocker
Create your WordPress development environment in 3 SECONDS!
Stars: ✭ 482 (+1317.65%)
Mutual labels:  wp-cli, wordpress
Wp Cli
⚙️ WP-CLI framework
Stars: ✭ 4,474 (+13058.82%)
Mutual labels:  wp-cli, wordpress
Docker Compose Wordpress
An example Docker Compose setup for WordPress plugin or theme development.
Stars: ✭ 127 (+273.53%)
Mutual labels:  wp-cli, wordpress
Wordpress To Jekyll Exporter
One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Jekyll
Stars: ✭ 951 (+2697.06%)
Mutual labels:  wp-cli, wordpress
Wordup Cli
Wordup is a fully integrated development platform for WordPress. Develop plugins and themes locally. Preview in the cloud. Automatic updates in WP.
Stars: ✭ 116 (+241.18%)
Mutual labels:  wp-cli, wordpress
Docker Wordpress
WordPress container with Nginx 1.16 & PHP-FPM 7.3 based on Alpine Linux
Stars: ✭ 148 (+335.29%)
Mutual labels:  wp-cli, wordpress
Pilothouse
A command line app for managing a LEMP local development environment based on Docker.
Stars: ✭ 98 (+188.24%)
Mutual labels:  wp-cli, wordpress
Stream
🗄️ Stream plugin for WordPress
Stars: ✭ 335 (+885.29%)
Mutual labels:  wp-cli, wordpress
Vccw
A Vagrant based development environment.
Stars: ✭ 1,012 (+2876.47%)
Mutual labels:  wp-cli, wordpress
Wp Cli Fixtures
Easily generate custom fake data for WordPress
Stars: ✭ 65 (+91.18%)
Mutual labels:  wp-cli, wordpress
Wordpress Nginx Docker Compose
Run WordPress with nginx using Docker Compose.
Stars: ✭ 460 (+1252.94%)
Mutual labels:  wp-cli, wordpress
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (-23.53%)
Mutual labels:  wp-cli, wordpress

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 it as a WP CLI package:

wp package install wpsh/wp-cli-replicator

Usage

Export Content

Export content from the source site:

  1. Use the WordPress Importer plugin or the wp export command to export the site content.

  2. Use the WP Options Importer plugin to export the site options. The output should be a single options.json file.

Prepare Import

  1. Parse the exported WordPress eXtended RSS or WXR 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

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

Created by Kaspars Dambis.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].