{"id":32486270,"url":"https://github.com/raiseandfall/wpmigrate","last_synced_at":"2025-10-27T05:40:51.329Z","repository":{"id":32516712,"uuid":"36097862","full_name":"raiseandfall/wpmigrate","owner":"raiseandfall","description":"A tool to migrate Wordpress databases between environments","archived":false,"fork":false,"pushed_at":"2020-07-16T15:47:01.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-02T03:11:41.986Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/raiseandfall.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":"2015-05-22T22:26:09.000Z","updated_at":"2023-08-02T03:11:41.987Z","dependencies_parsed_at":"2022-09-23T13:12:45.915Z","dependency_job_id":null,"html_url":"https://github.com/raiseandfall/wpmigrate","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/raiseandfall/wpmigrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiseandfall%2Fwpmigrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiseandfall%2Fwpmigrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiseandfall%2Fwpmigrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiseandfall%2Fwpmigrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raiseandfall","download_url":"https://codeload.github.com/raiseandfall/wpmigrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raiseandfall%2Fwpmigrate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281222589,"owners_count":26464000,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-27T05:40:46.286Z","updated_at":"2025-10-27T05:40:51.323Z","avatar_url":"https://github.com/raiseandfall.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WORDPRESS DB MIGRATE\n\n\u003e A CL tool to migrate a Wordpress Database between different environments ( dev, staging, prod, ... ).\n  \nInspired by [grunt-wordpress-deploy](https://github.com/webrain/grunt-wordpress-deploy/).\nModified to run as a Node package.\n\n\n## REQUIREMENTS\n- ```mysqldump```\n\n\n## USAGE\n\n### 1. Create a configuration file ```.wprc``` \nThis file can be wherever on your computer but you'll need to call wpmigrate on the same level. \n\n#### IMPORTANT: It's safer to place the file outside of the git rep since it should never be tracked by git (contains database credentials). \n\nThis file contains the configuration of the different environments databases. You can create as much env as you want.\nEach environment object contains its database credentials as well as the URL of the Wordpress project on this environment.\n\n__NOTE__ \n- The ```url``` field needs to have a protocol \u0026 the full host used in the Wordpress config. No trailing slash !\n- The ```options``` object contains the backup directory name you want to use. Backups are made every time any migration happens.\n\n\n\n```json\n{\n  \"options\": {\n    \"backup_dir\": \"backups\"\n  },\n  \"environments\": {\n    \"development\": {\n      \"title\": \"development\",\n      \"database\": \"DB_NAME\",\n      \"user\": \"USER_DEV\",\n      \"pass\": \"PASSWORD_DEV\",\n      \"host\": \"HOST_DEV\",\n      \"url\": \"http://development.url\"\n    },\n    \"staging\": {\n      \"title\": \"staging\",\n      \"database\": \"DB_NAME\",\n      \"user\": \"USER_STAGING\",\n      \"pass\": \"PASSWORD_STAGING\",\n      \"host\": \"HOST_STAGING\",\n      \"url\": \"http://staging.url\"\n    },\n    \"production\": {\n      \"title\": \"production\",\n      \"database\": \"DB_NAME\",\n      \"user\": \"USER_PROD\",\n      \"pass\": \"PASSWORD_PROD\",\n      \"host\": \"HOST_PROD\",\n      \"url\": \"http://prod.url\"\n    }\n  }\n}\n```\n\n### 2. Run\n\n```shell\n$ wpmigrate --from=\u003csource\u003e --to=\u003ctarget\u003e\n```\n\n- ```from``` flag is the source environment\n- ```to``` flag is the target environment\n\nExample: \n```shell\n$ wpmigrate --from=development --to=staging\n```\n\nThis will migrate the database from the development env to the staging env.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraiseandfall%2Fwpmigrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraiseandfall%2Fwpmigrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraiseandfall%2Fwpmigrate/lists"}