{"id":26167694,"url":"https://github.com/nlemoine/wp-cli-move","last_synced_at":"2025-04-14T17:49:53.303Z","repository":{"id":274060815,"uuid":"921791852","full_name":"nlemoine/wp-cli-move","owner":"nlemoine","description":"Sync your WordPress content (database and uploads) between stages using the power of WP-CLI aliases.","archived":false,"fork":false,"pushed_at":"2025-01-25T09:49:48.000Z","size":18,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T17:49:29.482Z","etag":null,"topics":["cli","php","sync","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/nlemoine.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-24T16:16:07.000Z","updated_at":"2025-04-10T14:24:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0034224-21cb-4a2f-8c55-ca9573c8d108","html_url":"https://github.com/nlemoine/wp-cli-move","commit_stats":null,"previous_names":["nlemoine/wp-cli-move"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Fwp-cli-move","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Fwp-cli-move/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Fwp-cli-move/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Fwp-cli-move/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlemoine","download_url":"https://codeload.github.com/nlemoine/wp-cli-move/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248931154,"owners_count":21185123,"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","php","sync","wordpress","wp-cli","wp-cli-package"],"created_at":"2025-03-11T17:41:22.197Z","updated_at":"2025-04-14T17:49:53.296Z","avatar_url":"https://github.com/nlemoine.png","language":"PHP","readme":"# wp-cli-move\n\nSync your WordPress content (database and uploads) between stages using the power of WP-CLI aliases.\n\n## Install\n\nUsing composer:\n\n```sh\ncomposer require n5s/wp-cli-move --dev\n```\n\nUsing `wp package install`:\n\n```sh\nwp package install nlemoine/wp-cli-move:^0.1.0\n```\n\n## Requirements\n\nThe requirements must be met on both stages.\n\n- SSH access\n- WP-CLI\n- mysql/mysqldump\n- rsync\n- gzip (optional, can be disabled with the `--disable-compress` flag)\n\nBefore running commands, make sure you have WP-CLI aliases set up. This can be done either with the [`wp cli alias`](https://developer.wordpress.org/cli/commands/cli/alias/) command or by editing your `wp-cli.yml` file.\n\nOnce you're done, quickly check that remote WP-CLI commands work as expected:\n\n```sh\nwp @your-alias option get home\n\n# It should print your alias home URL\nhttps://example.org\n```\n\nFor more information about alias configuration, refer to the following WP-CLI documentation:\n\n- https://make.wordpress.org/cli/handbook/guides/running-commands-remotely/#aliases\n- https://make.wordpress.org/cli/handbook/references/config/\n\n## Usage\n\nDepending on the sync direction, use either the `pull` or `push` commands.\n\n```sh\nwp move pull/push [\u003calias\u003e] [--db] [--uploads] [--disable-compress] [--dry-run]\n```\n\nIf you omit the `--db` or `--uploads` flags, both data types will be synced by default.\n\nNote that the `\u003calias\u003e` argument is optional. Configured aliases will be shown in a menu to choose from if left empty.\n\n\u003e [!CAUTION]\n\u003e Just like any tool that manipulates your data, it's **always a good idea to make a backup before running commands**.\n\u003e\n\u003e Especially when syncing uploads, which uses the `rsync` command with the `--delete` flag under the hood and can wipe all your media files if used incorrectly.\n\u003e\n\u003e **Be sure to know what you're doing.**\n\n### Options\n\nBoth `pull` and `push` commands use the same options.\n\n- `[\u003calias\u003e]`: The alias you want to sync with.\n- `--db`: Sync only the database.\n- `--uploads`: Sync only the uploads.\n- `--disable-compress`: Disable database dump compression.\n- `--dry-run`: Print the command sequence without making any changes.\n\n\u003e [!NOTE]\n\u003e Each time you sync your database from one stage to another, `wp-cli-move` will locally backup the database of the synced stage (a local database dump when pulling, a remote database dump when pushing).\n\n### Examples\n\n### Pulling content\n\nPull your production content to your local environment:\n\n```sh\nwp move pull @production\n```\n\n\u003e [!TIP]\n\u003e Using `@` as declared in `wp-cli.yml` is optional. For example, `production` and `@production` will resolve the same alias.\n\n### Pushing content\n\nPush your local content to your staging environment:\n\n```sh\nwp move push staging\n```\n\n## Credits\n\nThis WP-CLI package aims to replace the (still working but unmaintained) awesome [Wordmove](https://github.com/welaika/wordmove) Ruby gem 💎. It has been a time and life saver for many years. I'll be forever grateful to [@alessandro-fazzi](https://github.com/alessandro-fazzi) for creating it! 🙌\n\nAlthough [Wordmove](https://github.com/welaika/wordmove) is a great and handy tool for your daily WordPress work, some reasons led me to come with a simpler, more WordPress flavoured alternative:\n\n- It has become harder to easily install the gem over the years as the required Ruby version has been deprecated, especially for non-Ruby developers (at least for me).\n- Most importantly, [an idea I submitted years ago](https://github.com/welaika/wordmove/issues/601#issue-612726521) has never been implemented. This feature would remove a lot of tedious configuration setup (database credentials, etc.).\n- It's written in Ruby 😄\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlemoine%2Fwp-cli-move","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlemoine%2Fwp-cli-move","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlemoine%2Fwp-cli-move/lists"}