--- /dev/null
+mysql-backup-dir/
+node_modules/
--- /dev/null
+module.exports = (grunt) ->
+ grunt.initConfig
+ pkg: grunt.file.readJSON "package.json"
+
+ mysqlrunfile:
+ options:
+ connection:
+ host: "localhost"
+ user: "grunt"
+ password: "test555"
+ database: "grunttestdb"
+ multipleStatements: true
+ updatePrefix:
+ src: ['test/test.sql']
+ dropTables:
+ src: ['test/dropGlmTables.sql']
+
+ backup4mysql:
+ options:
+ user: "grunt"
+ password: "test555"
+ host: "localhost"
+ database: "grunttestdb"
+ backup:
+ dir: "mysql-backup-dir"
+ recovery:
+ dir: "mysql-backup-dir"
+
+ replace:
+ prefix:
+ src: 'wp-config.php'
+ dest: 'wp-config.php'
+ replacements: [
+ from: /(\$table_prefix)(.*)= '(.*)';/g
+ to: "$1 = 'glm_';"
+ ]
+
+
+ grunt.loadNpmTasks "grunt-mysql-runfile"
+ grunt.loadNpmTasks "grunt-mysql-backup"
+ grunt.loadNpmTasks "grunt-text-replace"
+
+ grunt.registerTask "default", ["sayHello"]
+
+ grunt.registerTask "wpSetup", ["mysqlrunfile:updatePrefix"]
+
+ grunt.registerTask "wpTearDown", ["mysqlrunfile:dropTables"]
+
+ grunt.registerTask "wpBackup", ["backup4mysql:backup"]
+
+ grunt.registerTask "wpRecover", ["backup4mysql:recovery"]
+
+ grunt.registerTask "wpReplace", ["replace:prefix"]
+
+ grunt.registerTask "sayHello", ->
+ chalk = require('chalk')
+ grunt.log.writeln(chalk.black.bgWhite.bold 'Hello There!')
+ grunt.log.writeln('Welcome to our little Grunt script!')
--- /dev/null
+{
+ "name": "WP-Sites",
+ "version": "0.0.1",
+ "description": "Grunt Project for Running Site Go Live Checklist",
+ "repository": {
+ "type": "git",
+ "url": "git@cvs2:prog/Grunt/WP-Sites.git"
+ },
+ "author": "Steve Sutton <steve@gaslightmedia.com>",
+ "license": "MIT",
+ "devDependencies": {
+ "grunt": "~0.4.5",
+ "grunt-mysql-runfile": "~0.2.1",
+ "grunt-mysql-backup": "0.0.2",
+ "grunt-text-replace": "~0.4.0",
+ "chalk": "~1.0.0"
+ }
+}
--- /dev/null
+DROP TABLE `glm_commentmeta`;
+DROP TABLE `glm_comments`;
+DROP TABLE `glm_links`;
+DROP TABLE `glm_options`;
+DROP TABLE `glm_postmeta`;
+DROP TABLE `glm_posts`;
+DROP TABLE `glm_term_relationships`;
+DROP TABLE `glm_term_taxonomy`;
+DROP TABLE `glm_terms`;
+DROP TABLE `glm_usermeta`;
+DROP TABLE `glm_users`;
--- /dev/null
+RENAME table `wp_commentmeta` TO `glm_commentmeta`;
+RENAME table `wp_comments` TO `glm_comments`;
+RENAME table `wp_links` TO `glm_links`;
+RENAME table `wp_options` TO `glm_options`;
+RENAME table `wp_postmeta` TO `glm_postmeta`;
+RENAME table `wp_posts` TO `glm_posts`;
+RENAME table `wp_terms` TO `glm_terms`;
+RENAME table `wp_term_relationships` TO `glm_term_relationships`;
+RENAME table `wp_term_taxonomy` TO `glm_term_taxonomy`;
+RENAME table `wp_usermeta` TO `glm_usermeta`;
+RENAME table `wp_users` TO `glm_users`;
+
+INSERT INTO `glm_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES
+('cscott', '$P$$P$BJMie6Dwyp.RD6V6lGgh88TuJ/r625.', 'cscott', 'cscott@gaslightmedia.com', '', NOW(), '', 0, 'cscott'),
+('jodie', '$P$BzO0XuOIXx8b8x6ztWSKejkiK5lhvd/', 'jodie', 'jodie@gaslightmedia.com', '', NOW(), '', 0, 'jodie'),
+('laury', '$P$BUQqo9GDEdRxgPGN3xHgxTAmhZmYUO1', 'laury', 'laury@gaslightmedia.com', '', NOW(), '', 0, 'laury'),
+('anthony', '$P$BubULLBz9zOc1k7sQ6gQHkjCI40pOU1', 'anthony', 'anthony@gaslightmedia.com', '', NOW(), '', 0, 'anthony');
+
+UPDATE `glm_options` SET `option_name` = 'glm_user_roles' WHERE `option_name` = 'wp_user_roles';
+UPDATE `glm_usermeta` SET `meta_key` = 'glm_capabilities' WHERE `meta_key` = 'wp_capabilities';
+UPDATE `glm_usermeta` SET `meta_key` = 'glm_user_level' WHERE `meta_key` = 'wp_user_level';
+
+INSERT INTO `glm_usermeta` (`umeta_id`,`user_id`,`meta_key`,`meta_value`) VALUES
+(NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'cscott'), 'glm_capabilities', 'a:1:{s:13:"administrator";b:1;}'),
+(NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'cscott'), 'glm_user_level', '10');
+
+
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'jodie'), 'glm_capabilities', 'a:1:{s:13:"administrator";b:1;}');
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'jodie'), 'glm_user_level', '10');
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'jodie'), 'nickname', 'jodie');
+
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'laury'), 'glm_capabilities', 'a:1:{s:13:"administrator";b:1;}');
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'laury'), 'glm_user_level', '10');
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'laury'), 'nickname', 'laury');
+
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'anthony'), 'glm_capabilities', 'a:1:{s:13:"administrator";b:1;}');
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'anthony'), 'glm_user_level', '10');
+INSERT INTO `glm_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT `ID` FROM `glm_users` WHERE `user_login` = 'anthony'), 'nickname', 'anthony');
+
+UPDATE `glm_options` SET `timezone_string` = 'America/Detroit';
+UPDATE `glm_options` SET `start_of_week` = '0';
+UPDATE `glm_options` SET `show_on_front` = 'page';
+UPDATE `glm_options` SET `page_on_front` = '2';
+UPDATE `glm_posts` SET `post_title` = 'Front Page' WHERE `post_type` = 'page';
--- /dev/null
+<?php
+/**
+ * The base configurations of the WordPress.
+ *
+ * This file has the following configurations: MySQL settings, Table Prefix,
+ * Secret Keys, and ABSPATH. You can find more information by visiting
+ * {@link http://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php}
+ * Codex page. You can get the MySQL settings from your web host.
+ *
+ * This file is used by the wp-config.php creation script during the
+ * installation. You don't have to use the web site, you can just copy this file
+ * to "wp-config.php" and fill in the values.
+ *
+ * @package WordPress
+ */
+
+// ** MySQL settings - You can get this info from your web host ** //
+/** The name of the database for WordPress */
+define('DB_NAME', 'grunttestdb');
+
+/** MySQL database username */
+define('DB_USER', 'grunt');
+
+/** MySQL database password */
+define('DB_PASSWORD', 'test555');
+
+/** MySQL hostname */
+define('DB_HOST', 'localhost');
+
+/** Database Charset to use in creating database tables. */
+define('DB_CHARSET', 'utf8');
+
+/** The Database Collate type. Don't change this if in doubt. */
+define('DB_COLLATE', '');
+
+/**#@+
+ * Authentication Unique Keys and Salts.
+ *
+ * Change these to different unique phrases!
+ * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
+ * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
+ *
+ * @since 2.6.0
+ */
+define('AUTH_KEY', '7IJT[kUwkM~IhM-n6tZwG#f_4e;W*~]3mf#+u?rHy~axJGC7Vw.@Ksq#zH#m>C:c');
+define('SECURE_AUTH_KEY', ' t7J,}Rku|.$a/tMn^Da=?^9hJTP;0z|)-SwNB}^C9|oqMV5S=6:}s2:4{!nt*YG');
+define('LOGGED_IN_KEY', '#Kbm|]8w*9f,4%V(cWZnxGBk>U U< K]VQlz(ua&(>`D3RsU{A>#vRmH}.V +:Hi');
+define('NONCE_KEY', '+Rk2^|][>Fyd[$@-dcE7Qnjxj+++,|~`u4P,+m*];<gK[mLTLZ.(CSr57dlo9%Yw');
+define('AUTH_SALT', 'aW-E9=l}ZT?;BcdX54CRk&{sR*rM+*d!2}gnXX!c|bwE+<>_*|3Sb+Xf|s#}U.JQ');
+define('SECURE_AUTH_SALT', 'qgX|TBS,<LEls_tgZ</oE+g=ReI#L1_,n:%UScf;)g1+R)n-T47guR-}{h_XCdSh');
+define('LOGGED_IN_SALT', 'Bk8*AX|P`FDtUrn]C:$*`Ggk/y|yn@/f`e4I-kw|AG^R-9w|UCuz?dsfQE|yfsp:');
+define('NONCE_SALT', 'LOnHGnK9xv=Eq3Sx*TD|csKIrvFtB3-Jmf90e~;L2F=aqmKI(m4xYXkDSAes]1dq');
+
+/**#@-*/
+
+/**
+ * WordPress Database Table prefix.
+ *
+ * You can have multiple installations in one database if you give each a unique
+ * prefix. Only numbers, letters, and underscores please!
+ */
+$table_prefix = 'wp_';
+
+/**
+ * For developers: WordPress debugging mode.
+ *
+ * Change this to true to enable the display of notices during development.
+ * It is strongly recommended that plugin and theme developers use WP_DEBUG
+ * in their development environments.
+ */
+define('WP_DEBUG', false);
+
+/* That's all, stop editing! Happy blogging. */
+
+/** Absolute path to the WordPress directory. */
+if ( !defined('ABSPATH') )
+ define('ABSPATH', dirname(__FILE__) . '/');
+
+/** Sets up WordPress vars and included files. */
+require_once(ABSPATH . 'wp-settings.php');