# HG changeset patch # User Maarten de Keizer # Date 2014-06-21 22:04:15 # Node ID 1b46b989a9f2aac90b7ed2f886b0e228f2376b08 # Parent 8e1a300a09b712368ecc039a38ab780ac213c22a Add README.md and example config diff --git a/README.md b/README.md new file mode 100644 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ + +Markei DB migrate +================= + + +Script for easy DTAP for Wordpress sites + + + +Installation +------------ + + +Add markei/dbmigrate to require-lines in composer.json + +Run composer update + +Copy the example config to {project-root}/config/dbmigrate/dbmigrate.ini + +Update the configuration with your own parameters + + + +Usage +----- + +For Windows +cd {project-root} +vendor\bin\dbmigrate.php.bat + +The script will list the configured environments + +First fill in the source environment, second fill in the destination. +Check your input and start. + +1. a backup of the source database will be made. +2. a backup of the destination database will be made. +3. the backup of the source database will be imported by the destination database +4. the source domain will be replaced with the destination domain in the destination database \ No newline at end of file diff --git a/Resources/config-example/dbmigrate.ini b/Resources/config-example/dbmigrate.ini new file mode 100644 --- /dev/null +++ b/Resources/config-example/dbmigrate.ini @@ -0,0 +1,32 @@ + +[env_dev] +host = localhost +user = my_user +password = secret_password +name = my_wp_site +port = 3306 +domain = dev-www.my-site.tld + +[env_test] +host = db01 +user = my_user +password = secret_password +name = my_wp_site +port = 3306 +domain = test-www.my-site.tld + +[env_acc] +host = db02 +user = my_user +password = secret_password +name = my_wp_site +port = 3306 +domain = acc-www.my-site.tld + +[env_prod] +host = db03 +user = my_user +password = secret_password +name = my_wp_site +port = 3306 +domain = www.my-site.tld