Duplicator – WordPress Migration Plugin - Version 1.1.20

Version Description

Download this release

Release Info

Developer cory@lamle.org
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 1.1.20
Comparing to
See all releases

Code changes from version 1.1.18 to 1.1.20

classes/package.archive.zip.php CHANGED
@@ -40,6 +40,8 @@ class DUP_Zip extends DUP_Archive
40
  $filterDirs = empty($archive->FilterDirs) ? 'not set' : $archive->FilterDirs;
41
  $filterExts = empty($archive->FilterExts) ? 'not set' : $archive->FilterExts;
42
  $filterOn = ($archive->FilterOn) ? 'ON' : 'OFF';
 
 
43
 
44
  //LOAD SCAN REPORT
45
  $json = file_get_contents(DUPLICATOR_SSDIR_PATH_TMP . "/{$archive->Package->NameHash}_scan.json");
@@ -55,7 +57,7 @@ class DUP_Zip extends DUP_Archive
55
  DUP_Log::Info("ARCHIVE DIR: " . self::$compressDir);
56
  DUP_Log::Info("ARCHIVE FILE: " . basename(self::$zipPath));
57
  DUP_Log::Info("FILTERS: *{$filterOn}*");
58
- DUP_Log::Info("DIRS: {$filterDirs}");
59
  DUP_Log::Info("EXTS: {$filterExts}");
60
 
61
  DUP_Log::Info("----------------------------------------");
@@ -74,23 +76,37 @@ class DUP_Zip extends DUP_Archive
74
  self::$zipArchive->open(self::$zipPath, ZipArchive::CREATE);
75
 
76
  //ZIP DIRECTORIES
 
77
  foreach(self::$scanReport->ARC->Dirs as $dir)
78
  {
79
  if (is_readable($dir) && self::$zipArchive->addEmptyDir(ltrim(str_replace(self::$compressDir, '', $dir), '/')))
80
  {
81
  self::$countDirs++;
 
82
  }
83
  else
84
  {
85
  //Don't warn when dirtory is the root path
86
- if (strcmp($dir, rtrim(self::$compressDir, '/')) != 0)
87
- DUP_Log::Info("WARNING: Unable to zip directory: '{$dir}'" . rtrim(self::$compressDir, '/'));
 
 
88
  }
89
  }
 
 
 
 
 
 
 
 
 
90
 
91
  /* ZIP FILES: Network Flush
92
  * This allows the process to not timeout on fcgi
93
  * setups that need a response every X seconds */
 
94
  if (self::$networkFlush)
95
  {
96
  foreach(self::$scanReport->ARC->Files as $file)
@@ -102,7 +118,7 @@ class DUP_Zip extends DUP_Archive
102
  }
103
  else
104
  {
105
- DUP_Log::Info("WARNING: Unable to zip file: {$file}");
106
  }
107
  //Trigger a flush to the web server after so many files have been loaded.
108
  if(self::$limitItems > DUPLICATOR_ZIP_FLUSH_TRIGGER)
@@ -115,8 +131,8 @@ class DUP_Zip extends DUP_Archive
115
  DUP_Log::Info("Items archived [{$sumItems}] flushing response.");
116
  }
117
  }
118
- //Normal
119
  }
 
120
  else
121
  {
122
  foreach(self::$scanReport->ARC->Files as $file)
@@ -124,11 +140,19 @@ class DUP_Zip extends DUP_Archive
124
  if (is_readable($file) && self::$zipArchive->addFile($file, ltrim(str_replace(self::$compressDir, '', $file), '/'))) {
125
  self::$countFiles++;
126
  } else {
127
- DUP_Log::Info("WARNING: Unable to zip file: {$file}");
128
  }
129
  }
130
  }
131
 
 
 
 
 
 
 
 
 
132
  DUP_Log::Info(print_r(self::$zipArchive, true));
133
 
134
  //--------------------------------
40
  $filterDirs = empty($archive->FilterDirs) ? 'not set' : $archive->FilterDirs;
41
  $filterExts = empty($archive->FilterExts) ? 'not set' : $archive->FilterExts;
42
  $filterOn = ($archive->FilterOn) ? 'ON' : 'OFF';
43
+ $filterDirsFormat = rtrim(str_replace(';', "\n ", $filterDirs));
44
+ $lastDirSuccess = self::$compressDir;
45
 
46
  //LOAD SCAN REPORT
47
  $json = file_get_contents(DUPLICATOR_SSDIR_PATH_TMP . "/{$archive->Package->NameHash}_scan.json");
57
  DUP_Log::Info("ARCHIVE DIR: " . self::$compressDir);
58
  DUP_Log::Info("ARCHIVE FILE: " . basename(self::$zipPath));
59
  DUP_Log::Info("FILTERS: *{$filterOn}*");
60
+ DUP_Log::Info("DIRS: {$filterDirsFormat}");
61
  DUP_Log::Info("EXTS: {$filterExts}");
62
 
63
  DUP_Log::Info("----------------------------------------");
76
  self::$zipArchive->open(self::$zipPath, ZipArchive::CREATE);
77
 
78
  //ZIP DIRECTORIES
79
+ $info = '';
80
  foreach(self::$scanReport->ARC->Dirs as $dir)
81
  {
82
  if (is_readable($dir) && self::$zipArchive->addEmptyDir(ltrim(str_replace(self::$compressDir, '', $dir), '/')))
83
  {
84
  self::$countDirs++;
85
+ $lastDirSuccess = $dir;
86
  }
87
  else
88
  {
89
  //Don't warn when dirtory is the root path
90
+ if (strcmp($dir, rtrim(self::$compressDir, '/')) != 0) {
91
+ $dir_path = strlen($dir) ? "[{$dir}]" : "[Read Error] - last successful read was: [{$lastDirSuccess}]";
92
+ $info .= "DIR: {$dir_path}\n";
93
+ }
94
  }
95
  }
96
+
97
+ //LOG Unreadable DIR info
98
+ if (strlen($info))
99
+ {
100
+ DUP_Log::Info("\nWARNING: Unable to zip directories:");
101
+ DUP_Log::Info($info);
102
+ }
103
+
104
+
105
 
106
  /* ZIP FILES: Network Flush
107
  * This allows the process to not timeout on fcgi
108
  * setups that need a response every X seconds */
109
+ $info = '';
110
  if (self::$networkFlush)
111
  {
112
  foreach(self::$scanReport->ARC->Files as $file)
118
  }
119
  else
120
  {
121
+ $info .= "FILE: [{$file}]\n";
122
  }
123
  //Trigger a flush to the web server after so many files have been loaded.
124
  if(self::$limitItems > DUPLICATOR_ZIP_FLUSH_TRIGGER)
131
  DUP_Log::Info("Items archived [{$sumItems}] flushing response.");
132
  }
133
  }
 
134
  }
135
+ //Normal
136
  else
137
  {
138
  foreach(self::$scanReport->ARC->Files as $file)
140
  if (is_readable($file) && self::$zipArchive->addFile($file, ltrim(str_replace(self::$compressDir, '', $file), '/'))) {
141
  self::$countFiles++;
142
  } else {
143
+ $info .= "FILE: [{$file}]\n";
144
  }
145
  }
146
  }
147
 
148
+ //LOG Unreadable FILE info
149
+ if (strlen($info))
150
+ {
151
+ DUP_Log::Info("\nWARNING: Unable to zip files:");
152
+ DUP_Log::Info($info);
153
+ unset($info);
154
+ }
155
+
156
  DUP_Log::Info(print_r(self::$zipArchive, true));
157
 
158
  //--------------------------------
classes/package.php CHANGED
@@ -177,7 +177,7 @@ class DUP_Package {
177
  $php_max_memory = ($php_max_memory === false) ? "Unabled to set php memory_limit" : DUPLICATOR_PHP_MAX_MEMORY . " ({$php_max_memory} default)";
178
 
179
  $info = "********************************************************************************\n";
180
- $info .= "PACKAGE-LOG: " . @date("Y-m-d H:i:s") . "\n";
181
  $info .= "NOTICE: Do NOT post to public sites or forums \n";
182
  $info .= "********************************************************************************\n";
183
  $info .= "VERSION:\t" . DUPLICATOR_VERSION . "\n";
177
  $php_max_memory = ($php_max_memory === false) ? "Unabled to set php memory_limit" : DUPLICATOR_PHP_MAX_MEMORY . " ({$php_max_memory} default)";
178
 
179
  $info = "********************************************************************************\n";
180
+ $info .= "DUPLICATOR-LITE PACKAGE-LOG: " . @date("Y-m-d H:i:s") . "\n";
181
  $info .= "NOTICE: Do NOT post to public sites or forums \n";
182
  $info .= "********************************************************************************\n";
183
  $info .= "VERSION:\t" . DUPLICATOR_VERSION . "\n";
define.php CHANGED
@@ -2,7 +2,7 @@
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
- define('DUPLICATOR_VERSION', '1.1.18');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_GIVELINK', 'http://lifeinthegrid.com/partner');
8
  define('DUPLICATOR_HELPLINK', 'http://lifeinthegrid.com/duplicator-docs');
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
+ define('DUPLICATOR_VERSION', '1.1.20');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_GIVELINK', 'http://lifeinthegrid.com/partner');
8
  define('DUPLICATOR_HELPLINK', 'http://lifeinthegrid.com/duplicator-docs');
duplicator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
6
- Version: 1.1.18
7
  Author: LifeInTheGrid
8
  Author URI: http://www.lifeinthegrid.com
9
  Text Domain: duplicator
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
6
+ Version: 1.1.20
7
  Author: LifeInTheGrid
8
  Author URI: http://www.lifeinthegrid.com
9
  Text Domain: duplicator
installer/build/ajax.step1.php CHANGED
@@ -8,15 +8,14 @@ if (! defined('DUPLICATOR_INIT')) {
8
  }
9
 
10
  //POST PARAMS
11
- $_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
12
- $_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
13
- $_POST['dbmysqlmode'] = (isset($_POST['dbmysqlmode']) && $_POST['dbmysqlmode'] == '1') ? true : false;
14
- $_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
15
- $_POST['ssl_login'] = (isset($_POST['ssl_login'])) ? true : false;
16
- $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
17
- $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
18
- $_POST['package_name'] = isset($_POST['package_name']) ? $_POST['package_name'] : null;
19
- $_POST['zip_manual'] = (isset($_POST['zip_manual']) && $_POST['zip_manual'] == '1') ? true : false;
20
 
21
  //LOGGING
22
  $POST_LOG = $_POST;
@@ -154,7 +153,7 @@ if ($_POST['zip_manual']) {
154
  }
155
 
156
  DUPX_Log::Info("********************************************************************************");
157
- DUPX_Log::Info('DUPLICATOR INSTALL-LOG');
158
  DUPX_Log::Info('STEP1 START @ ' . @date('h:i:s'));
159
  DUPX_Log::Info('NOTICE: Do NOT post to public sites or forums');
160
  DUPX_Log::Info("********************************************************************************");
@@ -264,7 +263,7 @@ if (!is_readable($sql_result_file_path) || filesize($sql_result_file_path) == 0)
264
 
265
  DUPX_Log::Info("\nUPDATED FILES:");
266
  DUPX_Log::Info("- SQL FILE: '{$sql_result_file_path}'");
267
- DUPX_Log::Info("- WP-CONFIG: '{$root_path}/wp-config.php'");
268
  $zip_end = DUPX_Util::get_microtime();
269
  DUPX_Log::Info("\nARCHIVE RUNTIME: " . DUPX_Util::elapsed_time($zip_end, $zip_start));
270
  DUPX_Log::Info("\n");
@@ -278,20 +277,30 @@ DUPX_Util::mysql_set_charset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
278
 
279
  //Will set mode to null only for this db handle session
280
  //sql_mode can cause db create issues on some systems
281
- if ($_POST['dbmysqlmode'])
282
- {
283
- @mysqli_query($dbh, "SET SESSION sql_mode = ''");
 
 
 
 
 
 
 
 
 
 
 
284
  }
285
 
286
- //Set defaults incase the variable could not be read
287
  $dbvar_maxtime = DUPX_Util::mysql_variable_value($dbh, 'wait_timeout');
288
  $dbvar_maxpacks = DUPX_Util::mysql_variable_value($dbh, 'max_allowed_packet');
289
  $dbvar_sqlmode = DUPX_Util::mysql_variable_value($dbh, 'sql_mode');
290
  $dbvar_maxtime = is_null($dbvar_maxtime) ? 300 : $dbvar_maxtime;
291
  $dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
292
- $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
293
  $dbvar_version = DUPX_Util::mysql_version($dbh);
294
- $dbwarning_modes = explode(',','NO_ENGINE_SUBSTITUTION,MYSQL323');
295
 
296
  DUPX_Log::Info("{$GLOBALS['SEPERATOR1']}");
297
  DUPX_Log::Info('DATABASE-ROUTINES');
@@ -304,12 +313,8 @@ DUPX_Log::Info("TIMEOUT:\t{$dbvar_maxtime}");
304
  DUPX_Log::Info("MAXPACK:\t{$dbvar_maxpacks}");
305
  DUPX_Log::Info("SQLMODE:\t{$dbvar_sqlmode}");
306
 
307
-
308
- if (in_array($dbvar_sqlmode, $dbwarning_modes))
309
  {
310
- $log = "WARNING: A sql_mode has been detected that may cause issues with this install.\n";
311
- $log .= "Please use the advanced options in Step 1 to disable the sql_mode or disable it the my.ini file\n";
312
- $log .= "For more details on this topic please visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
313
  DUPX_Log::Info("\n{$log}\n");
314
  }
315
 
8
  }
9
 
10
  //POST PARAMS
11
+ $_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
12
+ $_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
13
+ $_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
14
+ $_POST['ssl_login'] = (isset($_POST['ssl_login'])) ? true : false;
15
+ $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
16
+ $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
17
+ $_POST['package_name'] = isset($_POST['package_name']) ? $_POST['package_name'] : null;
18
+ $_POST['zip_manual'] = (isset($_POST['zip_manual']) && $_POST['zip_manual'] == '1') ? true : false;
 
19
 
20
  //LOGGING
21
  $POST_LOG = $_POST;
153
  }
154
 
155
  DUPX_Log::Info("********************************************************************************");
156
+ DUPX_Log::Info('DUPLICATOR-LITE INSTALL-LOG');
157
  DUPX_Log::Info('STEP1 START @ ' . @date('h:i:s'));
158
  DUPX_Log::Info('NOTICE: Do NOT post to public sites or forums');
159
  DUPX_Log::Info("********************************************************************************");
263
 
264
  DUPX_Log::Info("\nUPDATED FILES:");
265
  DUPX_Log::Info("- SQL FILE: '{$sql_result_file_path}'");
266
+ DUPX_Log::Info("- WP-CONFIG: '{$root_path}/wp-config.php' (if present)");
267
  $zip_end = DUPX_Util::get_microtime();
268
  DUPX_Log::Info("\nARCHIVE RUNTIME: " . DUPX_Util::elapsed_time($zip_end, $zip_start));
269
  DUPX_Log::Info("\n");
277
 
278
  //Will set mode to null only for this db handle session
279
  //sql_mode can cause db create issues on some systems
280
+ switch ($_POST['dbmysqlmode']) {
281
+ case 'DISABLE':
282
+ @mysqli_query($dbh, "SET SESSION sql_mode = ''");
283
+ break;
284
+ case 'CUSTOM':
285
+ $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
286
+ $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
287
+ if ($qry_session_custom == false)
288
+ {
289
+ $sql_error = mysqli_error($dbh);
290
+ $log = "WARNING: A custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
291
+ $log .= "For more details visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
292
+ }
293
+ break;
294
  }
295
 
296
+ //Set defaults in-case the variable could not be read
297
  $dbvar_maxtime = DUPX_Util::mysql_variable_value($dbh, 'wait_timeout');
298
  $dbvar_maxpacks = DUPX_Util::mysql_variable_value($dbh, 'max_allowed_packet');
299
  $dbvar_sqlmode = DUPX_Util::mysql_variable_value($dbh, 'sql_mode');
300
  $dbvar_maxtime = is_null($dbvar_maxtime) ? 300 : $dbvar_maxtime;
301
  $dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
302
+ $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
303
  $dbvar_version = DUPX_Util::mysql_version($dbh);
 
304
 
305
  DUPX_Log::Info("{$GLOBALS['SEPERATOR1']}");
306
  DUPX_Log::Info('DATABASE-ROUTINES');
313
  DUPX_Log::Info("MAXPACK:\t{$dbvar_maxpacks}");
314
  DUPX_Log::Info("SQLMODE:\t{$dbvar_sqlmode}");
315
 
316
+ if ($qry_session_custom == false)
 
317
  {
 
 
 
318
  DUPX_Log::Info("\n{$log}\n");
319
  }
320
 
installer/build/ajax.step2.php CHANGED
@@ -48,7 +48,7 @@ $charset_client = @mysqli_character_set_name($dbh);
48
  $log = <<<LOG
49
  \n\n
50
  ********************************************************************************
51
- DUPLICATOR INSTALL-LOG
52
  STEP2 START @ {$date}
53
  NOTICE: Do not post to public sites or forums
54
  ********************************************************************************
@@ -190,7 +190,8 @@ if (strlen($_POST['wp_username']) >= 4 && strlen($_POST['wp_password']) >= 6) {
190
  }
191
  }
192
 
193
- /*MU Updates*/
 
194
  $mu_newDomain = parse_url($_POST['url_new']);
195
  $mu_oldDomain = parse_url($_POST['url_old']);
196
  $mu_newDomainHost = $mu_newDomain['host'];
@@ -198,6 +199,10 @@ $mu_oldDomainHost = $mu_oldDomain['host'];
198
  $mu_newUrlPath = parse_url($_POST['url_new'], PHP_URL_PATH);
199
  $mu_oldUrlPath = parse_url($_POST['url_old'], PHP_URL_PATH);
200
 
 
 
 
 
201
  $mu_updates = @mysqli_query($dbh, "UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
202
  if ($mu_updates) {
203
  DUPX_Log::Info("Update MU table blogs: domain {$mu_newDomainHost} ");
@@ -205,20 +210,13 @@ if ($mu_updates) {
205
  DUPX_Log::Info("UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
206
  }
207
 
208
- /*UPDATE WP-CONFIG FILE */
209
- $patterns = array("/('|\")WP_HOME.*?\)\s*;/",
210
- "/('|\")WP_SITEURL.*?\)\s*;/",
211
- "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/",
212
- "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
213
- $replace = array("'WP_HOME', '{$_POST['url_new']}');",
214
- "'WP_SITEURL', '{$_POST['url_new']}');",
215
- "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');",
216
- "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
217
- $config_file = @file_get_contents('wp-config.php', true);
218
- $config_file = preg_replace($patterns, $replace, $config_file);
219
- file_put_contents('wp-config.php', $config_file);
220
-
221
- //Create Snapshots directory
222
  if (!file_exists(DUPLICATOR_SSDIR_NAME)) {
223
  mkdir(DUPLICATOR_SSDIR_NAME, 0755);
224
  }
@@ -226,28 +224,29 @@ $fp = fopen(DUPLICATOR_SSDIR_NAME . '/index.php', 'w');
226
  fclose($fp);
227
 
228
 
229
- //===============================
230
- //NOTICE TESTS
231
- //===============================
232
  DUPX_Log::Info("\n--------------------------------------");
233
  DUPX_Log::Info("NOTICES");
234
  DUPX_Log::Info("--------------------------------------");
235
  $config_vars = array('WP_CONTENT_DIR', 'WP_CONTENT_URL', 'WPCACHEHOME', 'COOKIE_DOMAIN', 'WP_SITEURL', 'WP_HOME', 'WP_TEMP_DIR');
236
- $config_found = DUPX_Util::string_has_value($config_vars, $config_file);
237
 
238
- //Files
239
- if ($config_found) {
240
- $msg = 'WP-CONFIG NOTICE: The wp-config.php has one or more of the following values set [' . implode(", ", $config_vars) . ']. Please validate these values are correct by opening the file and checking the values.';
 
241
  $JSON['step2']['warnlist'][] = $msg;
242
  DUPX_Log::Info($msg);
243
  }
244
 
245
- //Database
246
  $result = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name IN ('upload_url_path','upload_path')");
247
  if ($result) {
248
  while ($row = mysqli_fetch_row($result)) {
249
  if (strlen($row[0])) {
250
- $msg = "MEDIA SETTINGS NOTICE: The table '{$GLOBALS['FW_TABLEPREFIX']}options' has at least one the following values ['upload_url_path','upload_path'] set please validate settings. These settings can be changed in the wp-admin by going to Settings->Media area see 'Uploading Files'";
 
251
  $JSON['step2']['warnlist'][] = $msg;
252
  DUPX_Log::Info($msg);
253
  break;
48
  $log = <<<LOG
49
  \n\n
50
  ********************************************************************************
51
+ DUPLICATOR-LITE INSTALL-LOG
52
  STEP2 START @ {$date}
53
  NOTICE: Do not post to public sites or forums
54
  ********************************************************************************
190
  }
191
  }
192
 
193
+ /* ==============================
194
+ * MU Updates*/
195
  $mu_newDomain = parse_url($_POST['url_new']);
196
  $mu_oldDomain = parse_url($_POST['url_old']);
197
  $mu_newDomainHost = $mu_newDomain['host'];
199
  $mu_newUrlPath = parse_url($_POST['url_new'], PHP_URL_PATH);
200
  $mu_oldUrlPath = parse_url($_POST['url_old'], PHP_URL_PATH);
201
 
202
+ //Force a path for PATH_CURRENT_SITE
203
+ $mu_newUrlPath = (empty($mu_newUrlPath) || ($mu_newUrlPath == '/')) ? '/' : rtrim($mu_newUrlPath, '/') . '/';
204
+ $mu_oldUrlPath = (empty($mu_oldUrlPath) || ($mu_oldUrlPath == '/')) ? '/' : rtrim($mu_oldUrlPath, '/') . '/';
205
+
206
  $mu_updates = @mysqli_query($dbh, "UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
207
  if ($mu_updates) {
208
  DUPX_Log::Info("Update MU table blogs: domain {$mu_newDomainHost} ");
210
  DUPX_Log::Info("UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
211
  }
212
 
213
+
214
+ /* ==============================
215
+ * UPDATE WP-CONFIG FILE */
216
+ $config_file = DUPX_WPConfig::UpdateStep2();
217
+
218
+ //Create snapshots directory in order to
219
+ //compensate for permissions on some servers
 
 
 
 
 
 
 
220
  if (!file_exists(DUPLICATOR_SSDIR_NAME)) {
221
  mkdir(DUPLICATOR_SSDIR_NAME, 0755);
222
  }
224
  fclose($fp);
225
 
226
 
227
+ /* ==============================
228
+ NOTICE TESTS */
 
229
  DUPX_Log::Info("\n--------------------------------------");
230
  DUPX_Log::Info("NOTICES");
231
  DUPX_Log::Info("--------------------------------------");
232
  $config_vars = array('WP_CONTENT_DIR', 'WP_CONTENT_URL', 'WPCACHEHOME', 'COOKIE_DOMAIN', 'WP_SITEURL', 'WP_HOME', 'WP_TEMP_DIR');
233
+ $config_items = DUPX_Util::search_list_values($config_vars, $config_file);
234
 
235
+ //Files:
236
+ if (! empty($config_items)) {
237
+ $msg = 'NOTICE: The wp-config.php has one or more of the following values set [' . implode(", ", $config_items) . ']. ';
238
+ $msg .= 'Please validate these values are correct by opening the file and checking the values. To validate the meaning and proper usage of each parameter used the codex link above.';
239
  $JSON['step2']['warnlist'][] = $msg;
240
  DUPX_Log::Info($msg);
241
  }
242
 
243
+ //Database:
244
  $result = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name IN ('upload_url_path','upload_path')");
245
  if ($result) {
246
  while ($row = mysqli_fetch_row($result)) {
247
  if (strlen($row[0])) {
248
+ $msg = "NOTICE: The media settings values in the table '{$GLOBALS['FW_TABLEPREFIX']}options' has at least one the following values ['upload_url_path','upload_path'] set. ";
249
+ $msg .= "Please validate these settings by logging into your wp-admin and going to Settings->Media area and validating the 'Uploading Files' section";
250
  $JSON['step2']['warnlist'][] = $msg;
251
  DUPX_Log::Info($msg);
252
  break;
installer/build/assets/inc.css.php CHANGED
@@ -49,7 +49,8 @@
49
  select#dup-hlp-lnk {border-radius:3px; font-size:11px; margin:3px 5px 0 0px; background-color:#efefef; border:1px solid silver}
50
  div.dup-help-page {padding:5px 0 0 5px}
51
  div.dup-help-page fieldset {margin-bottom:25px}
52
- div#dup-main-help h3 {background-color:#dfdfdf; border:1px solid silver; border-radius:5px; padding:3px; margin-bottom:8px}
 
53
 
54
  div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
55
  div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:12px; overflow-y:scroll}
49
  select#dup-hlp-lnk {border-radius:3px; font-size:11px; margin:3px 5px 0 0px; background-color:#efefef; border:1px solid silver}
50
  div.dup-help-page {padding:5px 0 0 5px}
51
  div.dup-help-page fieldset {margin-bottom:25px}
52
+ div#dup-main-help {line-height:18px}
53
+ div#dup-main-help h3 {background-color:#dfdfdf; border:1px solid silver; border-radius:5px; padding:3px; margin-bottom:8px;}
54
 
55
  div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
56
  div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:12px; overflow-y:scroll}
installer/build/classes/class.conf.srv.php CHANGED
@@ -9,10 +9,8 @@ if (! defined('DUPLICATOR_INIT')) {
9
 
10
  /** * *****************************************************
11
  * Class used to update and edit web server configuration files */
12
-
13
  class DUPX_ServerConfig {
14
 
15
-
16
  /**
17
  * Clear .htaccess and web.config files and backup
18
  */
9
 
10
  /** * *****************************************************
11
  * Class used to update and edit web server configuration files */
 
12
  class DUPX_ServerConfig {
13
 
 
14
  /**
15
  * Clear .htaccess and web.config files and backup
16
  */
installer/build/classes/class.conf.wp.php CHANGED
@@ -8,14 +8,16 @@ if (!defined('DUPLICATOR_INIT')) {
8
  }
9
 
10
  /**
11
- * Class used to update and edit web server configuration files
12
- * for both Apache and IIS files .htaccess and web.config */
13
  class DUPX_WPConfig
14
  {
15
  /**
16
  * Updates the web server config files in Step 1 */
17
  public static function UpdateStep1()
18
  {
 
 
 
19
  $root_path = DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']);
20
  $wpconfig = @file_get_contents('wp-config.php', true);
21
 
@@ -78,7 +80,6 @@ class DUPX_WPConfig
78
  }
79
  }
80
 
81
-
82
  $wpconfig = preg_replace($patterns, $replace, $wpconfig);
83
  file_put_contents('wp-config.php', $wpconfig);
84
  $wpconfig = null;
@@ -88,8 +89,25 @@ class DUPX_WPConfig
88
  * Updates the web server config files in Step 2 */
89
  public static function UpdateStep2()
90
  {
91
- //Placeholder step 2 logic
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
-
94
  }
95
  ?>
8
  }
9
 
10
  /**
11
+ * Class used to update and edit and update the wp-config.php */
 
12
  class DUPX_WPConfig
13
  {
14
  /**
15
  * Updates the web server config files in Step 1 */
16
  public static function UpdateStep1()
17
  {
18
+ if (! file_exists('wp-config.php'))
19
+ return;
20
+
21
  $root_path = DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']);
22
  $wpconfig = @file_get_contents('wp-config.php', true);
23
 
80
  }
81
  }
82
 
 
83
  $wpconfig = preg_replace($patterns, $replace, $wpconfig);
84
  file_put_contents('wp-config.php', $wpconfig);
85
  $wpconfig = null;
89
  * Updates the web server config files in Step 2 */
90
  public static function UpdateStep2()
91
  {
92
+ $config_file = '';
93
+ if (! file_exists('wp-config.php')) {
94
+ return $config_file;
95
+ }
96
+
97
+ $patterns = array("/('|\")WP_HOME.*?\)\s*;/",
98
+ "/('|\")WP_SITEURL.*?\)\s*;/",
99
+ "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/",
100
+ "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
101
+ $replace = array("'WP_HOME', '{$_POST['url_new']}');",
102
+ "'WP_SITEURL', '{$_POST['url_new']}');",
103
+ "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');",
104
+ "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
105
+
106
+ $config_file = file_get_contents('wp-config.php', true);
107
+ $config_file = preg_replace($patterns, $replace, $config_file);
108
+ file_put_contents('wp-config.php', $config_file);
109
+
110
+ return $config_file;
111
  }
 
112
  }
113
  ?>
installer/build/classes/class.utils.php CHANGED
@@ -120,17 +120,18 @@ class DUPX_Util
120
  }
121
 
122
  /**
123
- * Finds a string in a file and returns true if found
124
  * @param array $list A list of strings to search for
125
  * @param string $haystack The string to search in
126
  */
127
- static public function string_has_value($list, $file) {
 
128
  foreach ($list as $var) {
129
- if (strstr($file, $var) !== false) {
130
- return true;
131
  }
132
  }
133
- return false;
134
  }
135
 
136
  /** METHOD: get_active_plugins
120
  }
121
 
122
  /**
123
+ * Looks for a list of strings in a string and returns each list item that is found
124
  * @param array $list A list of strings to search for
125
  * @param string $haystack The string to search in
126
  */
127
+ static public function search_list_values($list, $haystack) {
128
+ $found = array();
129
  foreach ($list as $var) {
130
+ if (strstr($haystack, $var) !== false) {
131
+ array_push($found, $var);
132
  }
133
  }
134
+ return $found;
135
  }
136
 
137
  /** METHOD: get_active_plugins
installer/build/main.installer.php CHANGED
@@ -278,7 +278,7 @@ if (isset($_POST['action_ajax'])) {
278
  <td style="white-space:nowrap">
279
 
280
  <i style='font-size:11px; color:#999'>
281
- version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?>&nbsp;&nbsp;<a href="installer.php?help=1" target="_blank">[Help]</a>
282
  </i> &nbsp;
283
 
284
  </td>
278
  <td style="white-space:nowrap">
279
 
280
  <i style='font-size:11px; color:#999'>
281
+ version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?>&nbsp;&nbsp;<a href="?help=1" target="_blank">[Help]</a>
282
  </i> &nbsp;
283
 
284
  </td>
installer/build/view.help.php CHANGED
@@ -1,222 +1,262 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- ?>
10
- <!-- =========================================
11
- HELP FORM -->
12
- <div id="dup-main-help">
13
- <div style="text-align:center">For in-depth help please see the <a href="http://lifeinthegrid.com/duplicator-docs" target="_blank">online resources</a></div>
14
-
15
- <h3>Step 1 - Deploy</h3>
16
- <div id="dup-help-step1" class="dup-help-page">
17
- <!-- MYSQL SERVER -->
18
- <fieldset>
19
- <legend><b>MySQL Server</b></legend>
20
-
21
- <b>Action:</b><br/>
22
- 'Create New' will attempt to create a new database if it does not exist. This option will not work on many hosting providers. If the database does not exist then you will need to login to your control panel and create the database. If 'Connect and Remove All Data' is checked this will DELETE all tables in the database you are connecting to as the Duplicator requires a blank database. Please make sure you have backups of all your data before using an portion of the installer, as this option WILL remove all data. Please contact your server administrator for more details.
23
- <br/><br/>
24
-
25
- <b>Host:</b><br/>
26
- The name of the host server that the database resides on. Many times this will be localhost, however each hosting provider will have it's own naming convention please check with your server administrator. To add a port number just append it to the host i.e. 'localhost:3306'.
27
- <br/><br/>
28
-
29
- <b>User:</b><br/>
30
- The name of a MySQL database server user. This is special account that has privileges to access a database and can read from or write to that database. <i style='font-size:11px'>This is <b>not</b> the same thing as your WordPress administrator account</i>
31
- <br/><br/>
32
-
33
- <b>Password:</b><br/>
34
- The password of the MySQL database server user.
35
- <br/><br/>
36
-
37
- <b>Test Connection:</b><br/>
38
- The test connection button will help validate if the connection parameters are correct for this server. There are three separate validation parameters:
39
- <ul>
40
- <li><b>Host:</b> Returns a status to indicate if the server host name is a valid host name <br/><br/></li>
41
- <li><b>Database:</b> Returns a status to indicate if the database name is a valid <br/><br/></li>
42
- <li><b>Version:</b> Shows the difference in database engine version numbers. If the package was created on a newer database version than where its trying to
43
- be installed then you can run into issues. Its best to make sure the server where the installer is running has the same or higher version number than
44
- where it was built.</li>
45
- </ul>
46
- <br/>
47
-
48
- <b>Name:</b><br/>
49
- The name of the database to which this installation will connect and install the new tables onto.
50
- <br/><br/>
51
-
52
- <div class="help" style="border-top:1px solid silver">
53
- <b>Common Database Connection Issues:</b><br/>
54
- - Double check case sensitive values 'User', 'Password' &amp; the 'Database Name' <br/>
55
- - Validate the database and database user exist on this server <br/>
56
- - Check if the database user has the correct permission levels to this database <br/>
57
- - The host 'localhost' may not work on all hosting providers <br/>
58
- - Contact your hosting provider for the exact required parameters <br/>
59
- - See the 'Database Setup Help' section on step 1 for more details<br/>
60
- - Visit the online resources 'Common FAQ page' <br/>
61
- </div>
62
-
63
-
64
- </fieldset>
65
-
66
- <!-- ADVANCED OPTS -->
67
- <fieldset>
68
- <legend><b>Advanced Options</b></legend>
69
- <b>Manual Package Extraction:</b><br/>
70
- This allows you to manually extract the zip archive on your own. This can be useful if your system does not have the ZipArchive support enabled.
71
- <br/><br/>
72
-
73
- <b>Enforce SSL on Admin:</b><br/>
74
- Turn off SSL support for WordPress. This sets FORCE_SSL_ADMIN in your wp-config file to false if true, otherwise it will create the setting if not set.
75
- <br/><br/>
76
-
77
- <b>Enforce SSL on Login:</b><br/>
78
- Turn off SSL support for WordPress Logins. This sets FORCE_SSL_LOGIN in your wp-config file to false if true, otherwise it will create the setting if not set.
79
- <br/><br/>
80
-
81
- <b>Keep Cache Enabled:</b><br/>
82
- Turn off Cache support for WordPress. This sets WP_CACHE in your wp-config file to false if true, otherwise it will create the setting if not set.
83
- <br/><br/>
84
-
85
- <b>Keep Cache Home Path:</b><br/>
86
- This sets WPCACHEHOME in your wp-config file to nothing if true, otherwise nothing is changed.
87
- <br/><br/>
88
-
89
- <b>Fix non-breaking space characters:</b><br/>
90
- The process will remove utf8 characters represented as 'xC2' 'xA0' and replace with a uniform space. Use this option if you find strange question marks in you posts
91
- <br/><br/>
92
-
93
- <b>MySQL Charset &amp; MySQL Collation:</b><br/>
94
- When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your databases character set should be.
95
- <br/>
96
- </fieldset>
97
- </div>
98
-
99
- <h3>Step 2 - Update</h3>
100
- <div id="dup-help-step2" class="dup-help-page">
101
-
102
- <!-- SETTINGS-->
103
- <fieldset>
104
- <legend><b>Settings</b></legend>
105
- <b>Old Settings:</b><br/>
106
- The URL and Path settings are the original values that the package was created with. These values should not be changed.
107
- <br/><br/>
108
-
109
- <b>New Settings:</b><br/>
110
- These are the new values (URL, Path and Title) you can update for the new location at which your site will be installed at.
111
- <br/>
112
- </fieldset>
113
-
114
- <!-- NEW ADMIN ACCOUNT-->
115
- <fieldset>
116
- <legend><b>New Admin Account</b></legend>
117
- <b>Username:</b><br/>
118
- The new username to create. This will create a new WordPress administrator account. Please note that usernames are not changeable from the within the UI.
119
- <br/><br/>
120
-
121
- <b>Password:</b><br/>
122
- The new password for the user.
123
- <br/>
124
- </fieldset>
125
-
126
- <!-- ADVANCED OPTS -->
127
- <fieldset>
128
- <legend><b>Advanced Options</b></legend>
129
- <b>Site URL:</b><br/>
130
- For details see WordPress <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">Site URL</a> &amp; <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" target="_blank">Alternate Directory</a>. If you're not sure about this value then leave it the same as the new settings URL.
131
- <br/><br/>
132
-
133
- <b>Scan Tables:</b><br/>
134
- Select the tables to be updated. This process will update all of the 'Old Settings' with the 'New Settings'. Hold down the 'ctrl key' to select/deselect multiple.
135
- <br/><br/>
136
-
137
- <b>Activate Plugins:</b><br/>
138
- These plug-ins are the plug-ins that were activated when the package was created and represent the plug-ins that will be activated after the install.
139
- <br/><br/>
140
-
141
- <b>Post GUID:</b><br/>
142
- If your moving a site keep this value checked. For more details see the <a href="http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note" target="_blank">notes on GUIDS</a>. Changing values in the posts table GUID column can change RSS readers to evaluate that the posts are new and may show them in feeds again.
143
- <br/><br/>
144
-
145
- <b>Full Search:</b><br/>
146
- Full search forces a scan of every single cell in the database. If it is not checked then only text based columns are searched which makes the update process much faster.
147
- <br/>
148
- </fieldset>
149
-
150
- </div>
151
-
152
- <h3>Step 3 - Test</h3>
153
- <div id="dup-help-step3" class="dup-help-page">
154
- <fieldset>
155
- <legend><b>Final Steps</b></legend>
156
-
157
- <b>Resave Permalinks</b><br/>
158
- Re-saving your perma-links will reconfigure your .htaccess file to match the correct path on your server. This step requires logging back into the WordPress administrator.
159
- <br/><br/>
160
-
161
- <b>Delete Installer Files</b><br/>
162
- When you're completed with the installation please delete all installer files. Leaving these files on your server can impose a security risk!
163
- <br/><br/>
164
-
165
- <b>Test Entire Site</b><br/>
166
- After the install is complete run through your entire site and test all pages and posts.
167
- <br/><br/>
168
-
169
- <b>View Install Report</b><br/>
170
- The install report is designed to give you a synopsis of the possible errors and warnings that may exist after the installation is completed.
171
- <br/>
172
- </fieldset>
173
- </div>
174
-
175
-
176
- <h3>Troubleshooting Tips</h3>
177
- <div id="troubleshoot" class="dup-help-page">
178
- <fieldset>
179
- <legend><b>Quick Overview</b></legend>
180
-
181
- <div style="padding: 0px 10px 10px 10px;">
182
- <b>Common Quick Fix Issues:</b>
183
- <ul>
184
- <li>Use an <a href='http://lifeinthegrid.com/duplicator-hosts' target='_blank'>approved hosting provider</a></li>
185
- <li>Validate directory and file permissions (see below)</li>
186
- <li>Validate web server configuration file (see below)</li>
187
- <li>Clear your browsers cache</li>
188
- <li>Deactivate and reactivate all plugins</li>
189
- <li>Resave a plugins settings if it reports errors</li>
190
- <li>Make sure your root directory is empty</li>
191
- </ul>
192
-
193
- <b>Permissions:</b><br/>
194
- Not all operating systems are alike. Therefore, when you move a package (zip file) from one location to another the file and directory permissions may not always stick. If this is the case then check your WordPress directories and make sure it's permissions are set to 755. For files make sure the permissions are set to 644 (this does not apply to windows servers). Also pay attention to the owner/group attributes. For a full overview of the correct file changes see the <a href='http://codex.wordpress.org/Hardening_WordPress#File_permissions' target='_blank'>WordPress permissions codex</a>
195
- <br/><br/>
196
-
197
- <b>Web server configuration files:</b><br/>
198
- For Apache web server the root .htaccess file was copied to .htaccess.orig. A new stripped down .htaccess file was created to help simplify access issues. For IIS web server the web.config file was copied to web.config.orig, however no new web.config file was created. If you have not altered this file manually then resaving your permalinks and resaving your plugins should resolve most all changes that were made to the root web configuration file. If your still experiencing issues then open the .orig file and do a compare to see what changes need to be made. <br/><br/><b>Plugin Notes:</b><br/> It's impossible to know how all 3rd party plugins function. The Duplicator attempts to fix the new install URL for settings stored in the WordPress options table. Please validate that all plugins retained there settings after installing. If you experience issues try to bulk deactivate all plugins then bulk reactivate them on your new duplicated site. If you run into issues were a plugin does not retain its data then try to resave the plugins settings.
199
- <br/><br/>
200
-
201
- <b>Cache Systems:</b><br/>
202
- Any type of cache system such as Super Cache, W3 Cache, etc. should be emptied before you create a package. Another alternative is to include the cache directory in the directory exclusion path list found in the options dialog. Including a directory such as \pathtowordpress\wp-content\w3tc\ (the w3 Total Cache directory) will exclude this directory from being packaged. In is highly recommended to always perform a cache empty when you first fire up your new site even if you excluded your cache directory.
203
- <br/><br/>
204
-
205
- <b>Trying Again:</b><br/>
206
- If you need to retry and reinstall this package you can easily run the process again by deleting all files except the installer.php and package file and then browse to the installer.php again.
207
- <br/><br/>
208
-
209
- <b>Additional Notes:</b><br/>
210
- If you have made changes to your PHP files directly this might have an impact on your duplicated site. Be sure all changes made will correspond to the sites new location.
211
- Only the package (zip file) and the installer.php file should be in the directory where you are installing the site. Please read through our knowledge base before submitting any issues.
212
- If you have a large log file that needs evaluated please email the file, or attach it to a help ticket.
213
- <br/><br/>
214
-
215
- </div>
216
- </fieldset>
217
- </div>
218
-
219
- <div style="text-align:center">For in-depth help please see the <a href="http://lifeinthegrid.com/duplicator-docs" target="_blank">online resources</a></div>
220
-
221
- <br/><br/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  </div>
1
+ <?php
2
+ // Exit if accessed directly
3
+ if (! defined('DUPLICATOR_INIT')) {
4
+ $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
+ header("HTTP/1.1 301 Moved Permanently");
6
+ header("Location: $_baseURL");
7
+ exit;
8
+ }
9
+ ?>
10
+ <!-- =========================================
11
+ HELP FORM -->
12
+ <div id="dup-main-help">
13
+ <div style="text-align:center">For in-depth help please see the <a href="http://lifeinthegrid.com/duplicator-docs" target="_blank">online resources</a></div>
14
+
15
+ <h3>Step 1 - Deploy</h3>
16
+ <div id="dup-help-step1" class="dup-help-page">
17
+ <!-- MYSQL SERVER -->
18
+ <fieldset>
19
+ <legend><b>MySQL Server</b></legend>
20
+
21
+ <b>Action:</b><br/>
22
+ 'Create New' will attempt to create a new database if it does not exist. This option will not work on many hosting providers. If the database does not exist then you will need to login to your control panel and create the database. If 'Connect and Remove All Data' is checked this will DELETE all tables in the database you are connecting to as the Duplicator requires a blank database. Please make sure you have backups of all your data before using an portion of the installer, as this option WILL remove all data. Please contact your server administrator for more details.
23
+ <br/><br/>
24
+
25
+ <b>Host:</b><br/>
26
+ The name of the host server that the database resides on. Many times this will be localhost, however each hosting provider will have it's own naming convention please check with your server administrator. To add a port number just append it to the host i.e. 'localhost:3306'.
27
+ <br/><br/>
28
+
29
+ <b>User:</b><br/>
30
+ The name of a MySQL database server user. This is special account that has privileges to access a database and can read from or write to that database. <i style='font-size:11px'>This is <b>not</b> the same thing as your WordPress administrator account</i>
31
+ <br/><br/>
32
+
33
+ <b>Password:</b><br/>
34
+ The password of the MySQL database server user.
35
+ <br/><br/>
36
+
37
+ <b>Test Connection:</b><br/>
38
+ The test connection button will help validate if the connection parameters are correct for this server. There are three separate validation parameters:
39
+ <ul>
40
+ <li><b>Host:</b> Returns a status to indicate if the server host name is a valid host name <br/><br/></li>
41
+ <li><b>Database:</b> Returns a status to indicate if the database name is a valid <br/><br/></li>
42
+ <li><b>Version:</b> Shows the difference in database engine version numbers. If the package was created on a newer database version than where its trying to
43
+ be installed then you can run into issues. Its best to make sure the server where the installer is running has the same or higher version number than
44
+ where it was built.</li>
45
+ </ul>
46
+ <br/>
47
+
48
+ <b>Name:</b><br/>
49
+ The name of the database to which this installation will connect and install the new tables onto.
50
+ <br/><br/>
51
+
52
+ <div class="help" style="border-top:1px solid silver">
53
+ <b>Common Database Connection Issues:</b><br/>
54
+ - Double check case sensitive values 'User', 'Password' &amp; the 'Database Name' <br/>
55
+ - Validate the database and database user exist on this server <br/>
56
+ - Check if the database user has the correct permission levels to this database <br/>
57
+ - The host 'localhost' may not work on all hosting providers <br/>
58
+ - Contact your hosting provider for the exact required parameters <br/>
59
+ - See the 'Database Setup Help' section on step 1 for more details<br/>
60
+ - Visit the online resources 'Common FAQ page' <br/>
61
+ </div>
62
+
63
+
64
+ </fieldset>
65
+
66
+ <!-- ADVANCED OPTS -->
67
+ <fieldset>
68
+ <legend><b>Advanced Options</b></legend>
69
+ <b>Manual Package Extraction:</b><br/>
70
+ This allows you to manually extract the zip archive on your own. This can be useful if your system does not have the ZipArchive support enabled.
71
+ <br/><br/>
72
+
73
+ <b>Enforce SSL on Admin:</b><br/>
74
+ Turn off SSL support for WordPress. This sets FORCE_SSL_ADMIN in your wp-config file to false if true, otherwise it will create the setting if not set.
75
+ <br/><br/>
76
+
77
+ <b>Enforce SSL on Login:</b><br/>
78
+ Turn off SSL support for WordPress Logins. This sets FORCE_SSL_LOGIN in your wp-config file to false if true, otherwise it will create the setting if not set.
79
+ <br/><br/>
80
+
81
+ <b>Keep Cache Enabled:</b><br/>
82
+ Turn off Cache support for WordPress. This sets WP_CACHE in your wp-config file to false if true, otherwise it will create the setting if not set.
83
+ <br/><br/>
84
+
85
+ <b>Keep Cache Home Path:</b><br/>
86
+ This sets WPCACHEHOME in your wp-config file to nothing if true, otherwise nothing is changed.
87
+ <br/><br/>
88
+
89
+ <b>Fix non-breaking space characters:</b><br/>
90
+ The process will remove utf8 characters represented as 'xC2' 'xA0' and replace with a uniform space. Use this option if you find strange question marks in you posts
91
+ <br/><br/>
92
+
93
+ <div id="help-mysql-mode">
94
+ <b>Mysql Mode:</b><br/>
95
+ The sql_mode option controls additional options you can pass to the MySQL server during the database import process. This option is only set <i>per session</i>
96
+ (during the Duplicator step 1 install process) and the modes here will return to their original state after step one runs. The sql_mode options will vary
97
+ based on each version of mysql. Below is a list list of links to the most recent MySQL versions.<br/>
98
+
99
+ <ul>
100
+ <li><a href="http://dev.mysql.com/doc/refman/5.5/en/sql-mode.html" target="_blank">MySQL Server 5.5 sql_mode options</a></li>
101
+ <li><a href="http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html" target="_blank">MySQL Server 5.6 sql_mode options</a></li>
102
+ <li><a href="http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html" target="_blank">MySQL Server 5.7 sql_mode options</a></li>
103
+ </ul>
104
+
105
+ This option creates a SET SESSION query such as <i>SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE'</i> and passes it to the MySQL server before any tables
106
+ or data are created. The following options are available:
107
+ <br/>
108
+ <ul>
109
+ <li>
110
+ <b>Default:</b> This option will not do anything and uses the default setting specified by the my.ini sql_mode value or the server's default sql_mode setting.
111
+ The installer-log.txt SQL_MODE value will show as NOT_SET if the my.ini sql_mode is not present or is set to empty.
112
+ <br/><br/>
113
+ </li>
114
+ <li>
115
+ <b>Disable:</b> This sets the sql_mode to an empty string which results in <i>SET SESSION sql_mode = ''</i>.
116
+ The installer-log.txt SQL_MODE value will show as NOT_SET<br/><br/>
117
+ </li>
118
+ <li>
119
+ <b>Custom:</b> This setting allows you to pass in a custom set of sql_mode options such as <i>SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE'</i>.
120
+ In the custom field input box enter in the sql_mode optionsthat you need for
121
+ your particular server setup.
122
+ <br/><br/>
123
+ Enter the sql mode as comma-separated values with no spaces, and <i>do not</i> include the 'SET SESSION' instruction. Be sure to pay attention to the MySQL server version and ensure it supports the specified options.
124
+ The installer-log.txt file will record any errors that may occur while using this advanced option.
125
+ </li>
126
+ </ul>
127
+
128
+ Please note that if the SQL_MODE in the installer-log.txt is not showing correctly that you may need to check your database users privileges. Also be sure that your MySQL
129
+ server version supports all the the sql_mode options you're trying to pass.
130
+ </div>
131
+ <br/>
132
+
133
+ <b>MySQL Charset &amp; MySQL Collation:</b><br/>
134
+ When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your databases character set should be.
135
+ <br/>
136
+ </fieldset>
137
+ </div>
138
+
139
+ <h3>Step 2 - Update</h3>
140
+ <div id="dup-help-step2" class="dup-help-page">
141
+
142
+ <!-- SETTINGS-->
143
+ <fieldset>
144
+ <legend><b>Settings</b></legend>
145
+ <b>Old Settings:</b><br/>
146
+ The URL and Path settings are the original values that the package was created with. These values should not be changed.
147
+ <br/><br/>
148
+
149
+ <b>New Settings:</b><br/>
150
+ These are the new values (URL, Path and Title) you can update for the new location at which your site will be installed at.
151
+ <br/>
152
+ </fieldset>
153
+
154
+ <!-- NEW ADMIN ACCOUNT-->
155
+ <fieldset>
156
+ <legend><b>New Admin Account</b></legend>
157
+ <b>Username:</b><br/>
158
+ The new username to create. This will create a new WordPress administrator account. Please note that usernames are not changeable from the within the UI.
159
+ <br/><br/>
160
+
161
+ <b>Password:</b><br/>
162
+ The new password for the user.
163
+ <br/>
164
+ </fieldset>
165
+
166
+ <!-- ADVANCED OPTS -->
167
+ <fieldset>
168
+ <legend><b>Advanced Options</b></legend>
169
+ <b>Site URL:</b><br/>
170
+ For details see WordPress <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">Site URL</a> &amp; <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" target="_blank">Alternate Directory</a>. If you're not sure about this value then leave it the same as the new settings URL.
171
+ <br/><br/>
172
+
173
+ <b>Scan Tables:</b><br/>
174
+ Select the tables to be updated. This process will update all of the 'Old Settings' with the 'New Settings'. Hold down the 'ctrl key' to select/deselect multiple.
175
+ <br/><br/>
176
+
177
+ <b>Activate Plugins:</b><br/>
178
+ These plug-ins are the plug-ins that were activated when the package was created and represent the plug-ins that will be activated after the install.
179
+ <br/><br/>
180
+
181
+ <b>Post GUID:</b><br/>
182
+ If your moving a site keep this value checked. For more details see the <a href="http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note" target="_blank">notes on GUIDS</a>. Changing values in the posts table GUID column can change RSS readers to evaluate that the posts are new and may show them in feeds again.
183
+ <br/><br/>
184
+
185
+ <b>Full Search:</b><br/>
186
+ Full search forces a scan of every single cell in the database. If it is not checked then only text based columns are searched which makes the update process much faster.
187
+ <br/>
188
+ </fieldset>
189
+
190
+ </div>
191
+
192
+ <h3>Step 3 - Test</h3>
193
+ <div id="dup-help-step3" class="dup-help-page">
194
+ <fieldset>
195
+ <legend><b>Final Steps</b></legend>
196
+
197
+ <b>Resave Permalinks</b><br/>
198
+ Re-saving your perma-links will reconfigure your .htaccess file to match the correct path on your server. This step requires logging back into the WordPress administrator.
199
+ <br/><br/>
200
+
201
+ <b>Delete Installer Files</b><br/>
202
+ When you're completed with the installation please delete all installer files. Leaving these files on your server can impose a security risk!
203
+ <br/><br/>
204
+
205
+ <b>Test Entire Site</b><br/>
206
+ After the install is complete run through your entire site and test all pages and posts.
207
+ <br/><br/>
208
+
209
+ <b>View Install Report</b><br/>
210
+ The install report is designed to give you a synopsis of the possible errors and warnings that may exist after the installation is completed.
211
+ <br/>
212
+ </fieldset>
213
+ </div>
214
+
215
+
216
+ <h3>Troubleshooting Tips</h3>
217
+ <div id="troubleshoot" class="dup-help-page">
218
+ <fieldset>
219
+ <legend><b>Quick Overview</b></legend>
220
+
221
+ <div style="padding: 0px 10px 10px 10px;">
222
+ <b>Common Quick Fix Issues:</b>
223
+ <ul>
224
+ <li>Use an <a href='http://lifeinthegrid.com/duplicator-hosts' target='_blank'>approved hosting provider</a></li>
225
+ <li>Validate directory and file permissions (see below)</li>
226
+ <li>Validate web server configuration file (see below)</li>
227
+ <li>Clear your browsers cache</li>
228
+ <li>Deactivate and reactivate all plugins</li>
229
+ <li>Resave a plugins settings if it reports errors</li>
230
+ <li>Make sure your root directory is empty</li>
231
+ </ul>
232
+
233
+ <b>Permissions:</b><br/>
234
+ Not all operating systems are alike. Therefore, when you move a package (zip file) from one location to another the file and directory permissions may not always stick. If this is the case then check your WordPress directories and make sure it's permissions are set to 755. For files make sure the permissions are set to 644 (this does not apply to windows servers). Also pay attention to the owner/group attributes. For a full overview of the correct file changes see the <a href='http://codex.wordpress.org/Hardening_WordPress#File_permissions' target='_blank'>WordPress permissions codex</a>
235
+ <br/><br/>
236
+
237
+ <b>Web server configuration files:</b><br/>
238
+ For Apache web server the root .htaccess file was copied to .htaccess.orig. A new stripped down .htaccess file was created to help simplify access issues. For IIS web server the web.config file was copied to web.config.orig, however no new web.config file was created. If you have not altered this file manually then resaving your permalinks and resaving your plugins should resolve most all changes that were made to the root web configuration file. If your still experiencing issues then open the .orig file and do a compare to see what changes need to be made. <br/><br/><b>Plugin Notes:</b><br/> It's impossible to know how all 3rd party plugins function. The Duplicator attempts to fix the new install URL for settings stored in the WordPress options table. Please validate that all plugins retained there settings after installing. If you experience issues try to bulk deactivate all plugins then bulk reactivate them on your new duplicated site. If you run into issues were a plugin does not retain its data then try to resave the plugins settings.
239
+ <br/><br/>
240
+
241
+ <b>Cache Systems:</b><br/>
242
+ Any type of cache system such as Super Cache, W3 Cache, etc. should be emptied before you create a package. Another alternative is to include the cache directory in the directory exclusion path list found in the options dialog. Including a directory such as \pathtowordpress\wp-content\w3tc\ (the w3 Total Cache directory) will exclude this directory from being packaged. In is highly recommended to always perform a cache empty when you first fire up your new site even if you excluded your cache directory.
243
+ <br/><br/>
244
+
245
+ <b>Trying Again:</b><br/>
246
+ If you need to retry and reinstall this package you can easily run the process again by deleting all files except the installer.php and package file and then browse to the installer.php again.
247
+ <br/><br/>
248
+
249
+ <b>Additional Notes:</b><br/>
250
+ If you have made changes to your PHP files directly this might have an impact on your duplicated site. Be sure all changes made will correspond to the sites new location.
251
+ Only the package (zip file) and the installer.php file should be in the directory where you are installing the site. Please read through our knowledge base before submitting any issues.
252
+ If you have a large log file that needs evaluated please email the file, or attach it to a help ticket.
253
+ <br/><br/>
254
+
255
+ </div>
256
+ </fieldset>
257
+ </div>
258
+
259
+ <div style="text-align:center">For in-depth help please see the <a href="http://lifeinthegrid.com/duplicator-docs" target="_blank">online resources</a></div>
260
+
261
+ <br/><br/>
262
  </div>
installer/build/view.step1.php CHANGED
@@ -148,6 +148,20 @@
148
  $( "input[name='dbaction']").click(Duplicator.showDeleteWarning);
149
  Duplicator.acceptWarning();
150
  Duplicator.showDeleteWarning();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  });
152
  </script>
153
 
@@ -282,7 +296,6 @@ VIEW: STEP 1- INPUT -->
282
  <table class="s1-opts">
283
  <tr><td><input type="checkbox" name="zip_manual" id="zip_manual" value="1" /> <label for="zip_manual">Manual package extraction</label></td></tr>
284
  <tr><td><input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label></td></tr>
285
- <tr><td><input type="checkbox" name="dbmysqlmode" id="dbmysqlmode" value="1" /> <label for="dbmysqlmode">Run this session with MySQL sql_mode disabled</label></td></tr>
286
  </table>
287
 
288
 
@@ -304,7 +317,20 @@ VIEW: STEP 1- INPUT -->
304
  <td>Config SSL</td>
305
  <td><input type="checkbox" name="ssl_admin" id="ssl_admin" <?php echo ($GLOBALS['FW_SSL_ADMIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_admin">Enforce on Admin</label></td>
306
  <td><input type="checkbox" name="ssl_login" id="ssl_login" <?php echo ($GLOBALS['FW_SSL_LOGIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_login">Enforce on Login</label></td>
307
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  </table>
309
 
310
  <table class="s1-opts s1-advopts">
@@ -312,7 +338,6 @@ VIEW: STEP 1- INPUT -->
312
  <tr><td>MySQL Collation </td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
313
  </table>
314
  <small><i>For an overview of these settings see the <a href="?help=1" target="_blank">help page</a></i></small><br/>
315
-
316
  </div>
317
 
318
 
148
  $( "input[name='dbaction']").click(Duplicator.showDeleteWarning);
149
  Duplicator.acceptWarning();
150
  Duplicator.showDeleteWarning();
151
+
152
+ //MySQL Mode
153
+ $("input[name=dbmysqlmode]").click(function() {
154
+ if ($(this).val() == 'CUSTOM') {
155
+ $('#dbmysqlmode_3_view').show();
156
+ } else {
157
+ $('#dbmysqlmode_3_view').hide();
158
+ }
159
+ });
160
+
161
+ if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
162
+ $('#dbmysqlmode_3_view').show();
163
+ }
164
+
165
  });
166
  </script>
167
 
296
  <table class="s1-opts">
297
  <tr><td><input type="checkbox" name="zip_manual" id="zip_manual" value="1" /> <label for="zip_manual">Manual package extraction</label></td></tr>
298
  <tr><td><input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label></td></tr>
 
299
  </table>
300
 
301
 
317
  <td>Config SSL</td>
318
  <td><input type="checkbox" name="ssl_admin" id="ssl_admin" <?php echo ($GLOBALS['FW_SSL_ADMIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_admin">Enforce on Admin</label></td>
319
  <td><input type="checkbox" name="ssl_login" id="ssl_login" <?php echo ($GLOBALS['FW_SSL_LOGIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_login">Enforce on Login</label></td>
320
+ </tr>
321
+ <tr>
322
+ <td style="vertical-align:top">MySQL Mode</td>
323
+ <td colspan="2">
324
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label> &nbsp;
325
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label> &nbsp;
326
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label> &nbsp;
327
+ <div id="dbmysqlmode_3_view" style="display:none; padding:5px">
328
+ <input type="text" name="dbmysqlmode_opts" value="" /><br/>
329
+ <small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas &amp; no spaces.<br/>
330
+ Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
331
+ </div>
332
+ </td>
333
+ </tr>
334
  </table>
335
 
336
  <table class="s1-opts s1-advopts">
338
  <tr><td>MySQL Collation </td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
339
  </table>
340
  <small><i>For an overview of these settings see the <a href="?help=1" target="_blank">help page</a></i></small><br/>
 
341
  </div>
342
 
343
 
installer/build/view.step3.php CHANGED
@@ -205,7 +205,7 @@ VIEW: STEP 3- INPUT -->
205
  switch ($num) {
206
  case 1:
207
  $key = 'free_inst_s3btn1';
208
- $txt = 'Considered Going Pro?';
209
  break;
210
  case 2:
211
  $key = 'free_inst_s3btn2';
@@ -218,7 +218,7 @@ VIEW: STEP 3- INPUT -->
218
  ?>
219
 
220
  <div class="s3-gopro-btn">
221
- <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content="<?php echo $key;?>" target="_blank"> <?php echo $txt;?></a>
222
  </div>
223
  <br/><br/>
224
 
@@ -232,7 +232,7 @@ VIEW: STEP 3- INPUT -->
232
  <script type="text/javascript">
233
  MyViewModel = function() {
234
  this.status = <?php echo urldecode($_POST['json']); ?>;
235
- var errorCount = this.status.step2.query_errs || 0;
236
  (errorCount >= 1 )
237
  ? $('#dup-step3-install-report-count').css('color', '#BE2323')
238
  : $('#dup-step3-install-report-count').css('color', '#197713')
205
  switch ($num) {
206
  case 1:
207
  $key = 'free_inst_s3btn1';
208
+ $txt = 'Want More Power?';
209
  break;
210
  case 2:
211
  $key = 'free_inst_s3btn2';
218
  ?>
219
 
220
  <div class="s3-gopro-btn">
221
+ <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=<?php echo $key;?>" target="_blank"> <?php echo $txt;?></a>
222
  </div>
223
  <br/><br/>
224
 
232
  <script type="text/javascript">
233
  MyViewModel = function() {
234
  this.status = <?php echo urldecode($_POST['json']); ?>;
235
+ var errorCount = this.status.step1.query_errs || 0;
236
  (errorCount >= 1 )
237
  ? $('#dup-step3-install-report-count').css('color', '#BE2323')
238
  : $('#dup-step3-install-report-count').css('color', '#197713')
readme.txt CHANGED
@@ -4,33 +4,49 @@ Donate link: www.lifeinthegrid.com/partner
4
  Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
5
  Requires at least: 4.0
6
  Tested up to: 4.6
7
- Stable tag: 1.1.18
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
11
 
12
  == Description ==
13
 
14
- > The Duplicator gives WordPress administrators the ability to migrate, copy or clone a site from one location to another. The plugin also serves as a simple backup utility. The Duplicator supports both serialized and base64 serialized string replacement. If you need to move WordPress or backup WordPress this plugin can help simplify the process. For complete details visit [lifeinthegrid.com](http://lifeinthegrid.com/).
 
 
 
 
15
 
16
  = Quick Video Demo =
17
  http://www.youtube.com/watch?v=yZ7pHmR9JC8
18
 
19
- = Admins/Developers/Designers =
20
- This tool is great to move or backup Wordpress sites and for pulling production sites down to your local machine for testing and validation. It also works good for developing locally and then pushing up to a production server for site releases/updates or just demoing a site.
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  = Duplicator Pro =
23
  Duplicator Pro takes Duplicator to the next level with features you'll really appreciate, such as:
24
 
25
  * Scheduled backups
26
  * Cloud Storage to Dropbox, Google Drive, Amazon S3 and FTP
27
- * Multisite support
28
- * Large site support
29
- * Large database support
30
  * Database creation *in the installer*
 
31
  * Email notifications
32
  * Professional support
33
- * ..and much more!
34
 
35
  Check out [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=wpo_premium&utm_campaign=duplicator_pro) today!
36
 
@@ -38,8 +54,7 @@ Check out [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicat
38
  The underlying logic to backup WordPress, move WordPress and transfer WordPress are very complex. It's impossible to know how each system is setup; this is why your feedback is important to us. Thanks for helping us to make WordPress the best blogging platform in the world.
39
 
40
  = Disclaimer =
41
- This plugin does require some technical knowledge. If you plan to move WordPress or backup WordPress please use it at your own risk and do not forget to back up your files and databases beforehand. If you're new to WordPress or have a very limited technical background you may consider seeking out professional help your first time using the plugin. If you need to move or backup WordPress and would like additional help please visit the Duplicator [resources page](http://lifeinthegrid.com/labs/duplicator/) .
42
-
43
 
44
 
45
  = Active Contributors =
@@ -47,10 +62,6 @@ The underlying logic to backup WordPress, move WordPress and transfer WordPress
47
  <li>[Hans-M. Herbrand](http://www.web266.de) (German) </li>
48
  <li>[Nicolas Richer](http://nicolasricher.fr) (French)</li>
49
 
50
- = Donate =
51
- Enjoy using *Duplicator*? Please consider [making a donation](http://lifeinthegrid.com/partner/) to support the project's continued development.
52
-
53
-
54
 
55
 
56
  == Installation ==
4
  Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
5
  Requires at least: 4.0
6
  Tested up to: 4.6
7
+ Stable tag: 1.1.20
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
11
 
12
  == Description ==
13
 
14
+ > Duplicator gives WordPress administrators the ability to migrate, copy or clone a site from one location to another. The plugin also serves as a simple backup utility.
15
+
16
+ Duplicator supports both serialized and base64 serialized string replacement. If you need to move WordPress or backup WordPress this plugin can help simplify the process.
17
+
18
+ For complete details visit [lifeinthegrid.com](http://lifeinthegrid.com/).
19
 
20
  = Quick Video Demo =
21
  http://www.youtube.com/watch?v=yZ7pHmR9JC8
22
 
23
+ = Overview =
24
+ Duplicator enables you to:
25
+
26
+ * Move a site between domains or hosts
27
+ * Pull down a live site to localhost for development
28
+ * Manually back up a site
29
+ * Duplicate a live site to a staging area or vice versa
30
+ * Bundle up an entire WordPress site for easy reuse or distribution
31
+
32
+ = Move and Backup =
33
+ Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress core files into a simple zip file called a package. This package can then be used to easily restore a site to any location you wish. Move on the same server, across servers and pretty much any location a WordPress site can be hosted.
34
+
35
+ = Improve Your Workflow =
36
+ Duplicator can also eliminate repeat site configuration work if you have a favorite theme, set of plugins or content you install on all sites. Instead of manually configuring these over and over, with Duplicator you just need to configure a single site which you then bundle up into a package. From that point forward, you can install the package in different locations to instantly create pre-configured sites! Web designers/developers can even create a package collection of the various starter sites they regularly install to save them setup time.
37
 
38
  = Duplicator Pro =
39
  Duplicator Pro takes Duplicator to the next level with features you'll really appreciate, such as:
40
 
41
  * Scheduled backups
42
  * Cloud Storage to Dropbox, Google Drive, Amazon S3 and FTP
43
+ * MultiThreaded to suppoert larger web sites &amp; databases
44
+ * Multisite (MU) support
 
45
  * Database creation *in the installer*
46
+ * Connect to cPanel directly from installer
47
  * Email notifications
48
  * Professional support
49
+ * ... and much more!
50
 
51
  Check out [Duplicator Pro](https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wp_org&utm_content=wpo_premium&utm_campaign=duplicator_pro) today!
52
 
54
  The underlying logic to backup WordPress, move WordPress and transfer WordPress are very complex. It's impossible to know how each system is setup; this is why your feedback is important to us. Thanks for helping us to make WordPress the best blogging platform in the world.
55
 
56
  = Disclaimer =
57
+ This plugin does require some technical knowledge. If you plan to move WordPress or backup WordPress please use it at your own risk and do not forget to back up your files and databases beforehand. If you're new to WordPress or have a very limited technical background you may consider seeking out professional help your first time using the plugin. If you need to move or backup WordPress and would like additional help please visit the Duplicator [resources page](http://lifeinthegrid.com/labs/duplicator/) .
 
58
 
59
 
60
  = Active Contributors =
62
  <li>[Hans-M. Herbrand](http://www.web266.de) (German) </li>
63
  <li>[Nicolas Richer](http://nicolasricher.fr) (French)</li>
64
 
 
 
 
 
65
 
66
 
67
  == Installation ==
views/packages/main/controller.php CHANGED
@@ -12,15 +12,13 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
12
 
13
  /*WIZARD TABS */
14
  div#dup-wiz {padding:0px; margin:0; }
15
- div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:12px; min-width:350px;}
16
  div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
17
- div#dup-wiz-steps a span {font-size:10px}
18
- /* wiz-steps numbers */
19
- #dup-wiz span {display:block;float:left; text-align:center; width:14px; margin:4px 5px 0px 0px; line-height:13px; color:#ccc; border:1px solid #CCCCCC; border-radius:5px; }
20
  /* wiz-steps default*/
21
- #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px; color:#000; background:#E4E4E4; border-radius:5px }
 
22
  /* wiz-steps active*/
23
- #dup-wiz .active-step a {color:#fff; background:#BBBBBB;}
24
  #dup-wiz .active-step span {color:#fff; border:1px solid #fff;}
25
  /* wiz-steps completed */
26
  #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
12
 
13
  /*WIZARD TABS */
14
  div#dup-wiz {padding:0px; margin:0; }
15
+ div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
16
  div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
 
 
 
17
  /* wiz-steps default*/
18
+ #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
19
+ color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
20
  /* wiz-steps active*/
21
+ #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
22
  #dup-wiz .active-step span {color:#fff; border:1px solid #fff;}
23
  /* wiz-steps completed */
24
  #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
views/packages/main/new1.inc.form.php CHANGED
@@ -377,7 +377,7 @@ INSTALLER -->
377
 
378
  <div class="dup-button-footer">
379
  <input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.ResetSettings()" />
380
- <input type="submit" value="<?php _e("Next", 'duplicator') ?> &#9658;" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
381
  </div>
382
 
383
  </form>
377
 
378
  <div class="dup-button-footer">
379
  <input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.ResetSettings()" />
380
+ <input type="submit" value="<?php _e("Next", 'duplicator') ?> &#9654;" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
381
  </div>
382
 
383
  </form>
views/packages/main/new1.setup.php CHANGED
@@ -52,9 +52,9 @@ TOOL BAR: STEPS -->
52
  <td style="white-space: nowrap">
53
  <div id="dup-wiz">
54
  <div id="dup-wiz-steps">
55
- <div class="active-step"><a><span>1</span> <?php _e('Setup', 'duplicator'); ?></a></div>
56
- <div><a><span>2</span> <?php _e('Scan', 'duplicator'); ?> </a></div>
57
- <div><a><span>3</span> <?php _e('Build', 'duplicator'); ?> </a></div>
58
  </div>
59
  <div id="dup-wiz-title">
60
  <?php _e('Step 1: Package Setup', 'duplicator'); ?>
52
  <td style="white-space: nowrap">
53
  <div id="dup-wiz">
54
  <div id="dup-wiz-steps">
55
+ <div class="active-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
56
+ <div><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
57
+ <div><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
58
  </div>
59
  <div id="dup-wiz-title">
60
  <?php _e('Step 1: Package Setup', 'duplicator'); ?>
views/packages/main/new2.scan.php CHANGED
@@ -82,9 +82,9 @@ TOOL BAR: STEPS -->
82
  <td style="white-space: nowrap">
83
  <div id="dup-wiz">
84
  <div id="dup-wiz-steps">
85
- <div class="completed-step"><a><span>1</span> <?php _e('Setup', 'duplicator'); ?></a></div>
86
- <div class="active-step"><a><span>2</span> <?php _e('Scan', 'duplicator'); ?> </a></div>
87
- <div><a><span>3</span> <?php _e('Build', 'duplicator'); ?> </a></div>
88
  </div>
89
  <div id="dup-wiz-title">
90
  <?php _e('Step 2: System Scan', 'duplicator'); ?>
@@ -505,9 +505,9 @@ TOOL BAR: STEPS -->
505
  </div> <!-- end #dup-progress-area -->
506
 
507
  <div class="dup-button-footer" style="display:none">
508
- <input type="button" value="&#9668; <?php _e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1')" class="button button-large" />
509
  <input type="button" value="<?php _e("Rescan", 'duplicator') ?>" onclick="Duplicator.Pack.Rescan()" class="button button-large" />
510
- <input type="submit" value="<?php _e("Build", 'duplicator') ?> &#9658" class="button button-primary button-large" id="dup-build-button" />
511
  </div>
512
  </form>
513
 
82
  <td style="white-space: nowrap">
83
  <div id="dup-wiz">
84
  <div id="dup-wiz-steps">
85
+ <div class="completed-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
86
+ <div class="active-step"><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
87
+ <div><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
88
  </div>
89
  <div id="dup-wiz-title">
90
  <?php _e('Step 2: System Scan', 'duplicator'); ?>
505
  </div> <!-- end #dup-progress-area -->
506
 
507
  <div class="dup-button-footer" style="display:none">
508
+ <input type="button" value="&#9664; <?php _e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1')" class="button button-large" />
509
  <input type="button" value="<?php _e("Rescan", 'duplicator') ?>" onclick="Duplicator.Pack.Rescan()" class="button button-large" />
510
+ <input type="submit" value="<?php _e("Build", 'duplicator') ?> &#9654" class="button button-primary button-large" id="dup-build-button" />
511
  </div>
512
  </form>
513
 
views/packages/main/new3.build.php CHANGED
@@ -33,9 +33,9 @@ TOOL BAR: STEPS -->
33
  <td style="white-space: nowrap">
34
  <div id="dup-wiz">
35
  <div id="dup-wiz-steps">
36
- <div class="completed-step"><a><span>1</span> <?php _e('Setup', 'duplicator'); ?></a></div>
37
- <div class="completed-step"><a><span>2</span> <?php _e('Scan', 'duplicator'); ?> </a></div>
38
- <div class="active-step"><a><span>3</span> <?php _e('Build', 'duplicator'); ?> </a></div>
39
  </div>
40
  <div id="dup-wiz-title">
41
  <?php _e('Step 3: Build Package', 'duplicator'); ?>
@@ -90,7 +90,8 @@ TOOL BAR: STEPS -->
90
  <small><i><?php _e("click buttons to download", 'duplicator') ?></i></small>
91
  </div>
92
  <div class="dup-msg-success-links">
93
- <?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
 
94
  </div><br/>
95
 
96
  <!-- Used for iMacros testing do not remove -->
33
  <td style="white-space: nowrap">
34
  <div id="dup-wiz">
35
  <div id="dup-wiz-steps">
36
+ <div class="completed-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
37
+ <div class="completed-step"><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
38
+ <div class="active-step"><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
39
  </div>
40
  <div id="dup-wiz-title">
41
  <?php _e('Step 3: Build Package', 'duplicator'); ?>
90
  <small><i><?php _e("click buttons to download", 'duplicator') ?></i></small>
91
  </div>
92
  <div class="dup-msg-success-links">
93
+ <?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?> &nbsp;
94
+ <?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
95
  </div><br/>
96
 
97
  <!-- Used for iMacros testing do not remove -->