PluginProbe ʕ •ᴥ•ʔ
JetBackup – Backup, Restore & Migrate / 2.0.3
JetBackup – Backup, Restore & Migrate v2.0.3
3.1.22.4 3.1.22.3 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.8.1 1.4.9 1.5.0 1.5.1 1.5.1.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.10 1.6.11 1.6.12 1.6.13 1.6.15 1.6.5.1 1.6.8.8 1.6.9 1.6.9.1 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7.5 2.0.8.7 2.0.9.11 2.0.9.14 2.0.9.15 2.0.9.6 2.0.9.7 2.0.9.9 3.1.10.7 3.1.11.1 3.1.12.3 3.1.13.4 3.1.14.17 3.1.15.4 3.1.16.1 3.1.17.5 3.1.18.10 3.1.18.8 3.1.18.9 3.1.19.8 3.1.20.3 3.1.21.3 3.1.7.9 3.1.9.2 trunk 1.1.90 1.1.91 1.2.0 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2
backup / com / config / config.wordpress.php
backup / com / config Last commit date
config.php 3 years ago config.wordpress.demo.php 3 years ago config.wordpress.free.php 3 years ago config.wordpress.php 3 years ago
config.wordpress.php
196 lines
1 <?php
2
3 global $wp_version, $wpdb;
4 if (!defined('SG_ENV_WORDPRESS')) {
5 define('SG_ENV_WORDPRESS', 'Wordpress');
6 }
7 define('SG_ENV_MAGENTO', 'Magento');
8 define('SG_ENV_VERSION', $wp_version);
9 if (!defined('SG_ENV_ADAPTER')) {
10 define('SG_ENV_ADAPTER', SG_ENV_WORDPRESS);
11 }
12 if (!defined('SG_ENV_DB_PREFIX')) {
13 define('SG_ENV_DB_PREFIX', $wpdb->prefix);
14 }
15 require_once(dirname(__FILE__) . '/config.php');
16
17 define('SG_ENV_CORE_TABLE', SG_WORDPRESS_CORE_TABLE);
18 //Database
19 if (!defined('SG_DB_ADAPTER')) {
20 define('SG_DB_ADAPTER', SG_ENV_ADAPTER);
21 }
22 if (!defined('SG_DB_NAME')) {
23 define('SG_DB_NAME', $wpdb->dbname);
24 }
25 if (!defined('SG_BACKUP_DATABASE_EXCLUDE')) {
26 define('SG_BACKUP_DATABASE_EXCLUDE', SG_ACTION_TABLE_NAME . ',' . SG_CONFIG_TABLE_NAME . ',' . SG_SCHEDULE_TABLE_NAME);
27 }
28
29 //Templates
30 define('SG_TEMPLATES_PATH', realpath(SG_APP_PATH . '../public/templates') . '/');
31
32 //Mail
33 define('SG_MAIL_TEMPLATES_PATH', realpath(SG_APP_PATH . '../public/templates/mails') . '/');
34 define('SG_MAIL_BACKUP_TEMPLATE', 'mail_backup.php');
35 define('SG_MAIL_RESTORE_TEMPLATE', 'mail_restore.php');
36 define('SG_MAIL_UPLOAD_TEMPLATE', 'mail_upload.php');
37
38 //Notice
39 define('SG_NOTICE_TEMPLATES_PATH', realpath(SG_APP_PATH . '../public/templates/notices') . '/');
40
41 //Htaccess
42 define('SG_HTACCESS_TEMPLATES_PATH', realpath(SG_APP_PATH . '../public/templates/htaccess') . '/');
43
44 //BackupGuard SDK
45 define('SG_BACKUPGUARD_CLIENT_ID', 'wordpress');
46 define('SG_BACKUPGUARD_CLIENT_SECRET', 'AAPQEgsyQrt6wqDBk7fpa24NP6W43evtayxXmUqS');
47
48 define('SG_BACKUPGUARD_UPLOAD_CLIENT_ID', 'backupguard');
49 define('SG_BACKUPGUARD_UPLOAD_CLIENT_SECRET', 'e9503d56b06b95241abf68eaa0d13194aae9503e');
50
51 define('SG_BACKUPGUARD_UPLOAD_SCOPE', 'create_backups');
52
53 //Backup
54 $wpContent = basename(WP_CONTENT_DIR);
55 $wpPlugins = basename(WP_PLUGIN_DIR);
56 $wpThemes = basename(get_theme_root());
57
58 $uploadDir = wp_upload_dir();
59 $wpUploads = basename($uploadDir['basedir']);
60
61 $dbCharset = 'utf8';
62 if (@constant("DB_CHARSET")) {
63 $dbCharset = DB_CHARSET;
64 }
65
66 //Exclude others plugin dirs
67 function backupGuardFindExcludesDirs()
68 {
69 $callback = function ($value) {
70 $marker = stripos($value, 'wp-content/');
71 if ($marker) {
72 $str = substr($value, $marker);
73 }
74
75 return $str;
76 };
77
78 $mergedArray = array_merge(
79 glob(WP_CONTENT_DIR . '/*backup*', GLOB_ONLYDIR),
80 glob(WP_CONTENT_DIR . '/*tmp*', GLOB_ONLYDIR),
81 glob(WP_CONTENT_DIR . '/*log*', GLOB_ONLYDIR),
82 glob(WP_CONTENT_DIR . '/uploads/*backup*', GLOB_ONLYDIR),
83 glob(WP_CONTENT_DIR . '/uploads/*log*', GLOB_ONLYDIR),
84 glob(WP_CONTENT_DIR . '/uploads/*temp*', GLOB_ONLYDIR)
85 );
86
87 return array_values(array_map($callback, $mergedArray));
88 }
89
90 $findExcludesDirs = backupGuardFindExcludesDirs();
91
92 //Define same constants in magento config file
93 define('SG_UPLOAD_PATH', $uploadDir['basedir']);
94 define('SG_UPLOAD_URL', $uploadDir['baseurl']);
95 if (!defined('SG_SITE_URL')) {
96 define('SG_SITE_URL', get_site_url());
97 }
98 define('SG_HOME_URL', get_home_url());
99 define('SG_DB_CHARSET', $dbCharset);
100 if (!defined('SG_MYSQL_VERSION')) {
101 define('SG_MYSQL_VERSION', $wpdb->db_version());
102 }
103 $type = "standard";
104
105 if (is_multisite()) {
106 $type = "multisite";
107 }
108
109 define('SG_SITE_TYPE', $type);
110
111 if (!defined('SG_PING_FILE_PATH')) {
112 define('SG_PING_FILE_PATH', $uploadDir['basedir'] . '/'.SG_BACKUP_FOLDER_NAME.'/ping.json');
113 }
114 //Symlink download
115 define('SG_SYMLINK_PATH', $uploadDir['basedir'] . '/sg_symlinks/');
116 define('SG_SYMLINK_URL', $uploadDir['baseurl'] . '/sg_symlinks/');
117
118 if (!defined('SG_APP_ROOT_DIRECTORY')) {
119 define('SG_APP_ROOT_DIRECTORY', realpath(dirname(WP_CONTENT_DIR) . "/")); //Wordpress Define
120 }
121
122 $sgBackupFilePathsExclude = array(
123 $wpContent . '/' . $wpPlugins . '/backup/',
124 $wpContent . '/' . $wpPlugins . '/backup-guard-pro/',
125 $wpContent . '/' . $wpPlugins . '/backup-guard-silver/',
126 $wpContent . '/' . $wpPlugins . '/backup-guard-gold/',
127 $wpContent . '/' . $wpPlugins . '/backup-guard-platinum/',
128 $wpContent . '/' . $wpUploads . '/sg_symlinks/',
129 $wpContent . '/Dropbox_Backup/',
130 $wpContent . '/updraft/',
131 $wpContent . '/upsupsystic/',
132 $wpContent . '/wpbackitup_backups/',
133 $wpContent . '/wpbackitup_restore/',
134 $wpContent . '/backups/',
135 $wpContent . '/cache/',
136 $wpContent . '/et-cache/',
137 $wpContent . '/litespeed/',
138 $wpContent . '/w3tc-config/',
139 $wpContent . '/wflogs/',
140 $wpContent . '/wp-rocket-config/',
141 $wpContent . '/et-temp/',
142 $wpContent . '/' . $wpUploads . '/wp-clone/',
143 $wpContent . '/' . $wpUploads . '/wp-staging/',
144 $wpContent . '/' . $wpUploads . '/wp-migrate-db/',
145 $wpContent . '/' . $wpUploads . '/db-backup/',
146 $wpContent . '/' . $wpPlugins . '/wordpress-move/backup/',
147 $wpContent . '/as3b_backups/',
148 $wpContent . '/' . $wpUploads . '/backupbuddy_backups/',
149 $wpContent . '/backups-dup-pro/',
150 $wpContent . '/managewp/backups/',
151 $wpContent . '/' . $wpUploads . '/backupbuddy_temp/',
152 $wpContent . '/' . $wpUploads . '/pb_backupbuddy/',
153 $wpContent . '/' . $wpUploads . '/snapshots/',
154 $wpContent . '/debug.log',
155 $wpContent . '/backup-db/',
156 $wpContent . '/' . $wpUploads . '/prime-mover-export-files/',
157 $wpContent . '/' . $wpUploads . '/prime-mover-lock-files/',
158 $wpContent . '/' . $wpUploads . '/prime-mover-tmp-downloads/',
159 $wpContent . '/' . $wpUploads . '/wpo/',
160 $wpContent . '/webtoffee_migrations/',
161 $wpContent . '/WPvivid_Uploads/',
162 $wpContent . '/wpvivid_staging/'
163 );
164
165 define('SG_BACKUP_FILE_PATHS_EXCLUDE', implode(',', array_merge($findExcludesDirs, $sgBackupFilePathsExclude)));
166 if (!defined('SG_BACKUP_DIRECTORY')) {
167 define('SG_BACKUP_DIRECTORY', $uploadDir['basedir'] . '/'.SG_BACKUP_FOLDER_NAME.'/'); //backups will be stored here
168 }
169 if (!defined('SG_BACKUP_OLD_DIRECTORY')) {
170 define('SG_BACKUP_OLD_DIRECTORY', $uploadDir['basedir'] . '/'.SG_BACKUP_OLD_FOLDER_NAME.'/'); //old backups are stored here
171 }
172 define('SG_BACKUP_DIRECTORY_URL', SG_UPLOAD_URL . '/'.SG_BACKUP_FOLDER_NAME.'/');
173
174 //Storage
175 define('SG_STORAGE_UPLOAD_CRON', '');
176
177 define('SG_BACKUP_FILE_PATHS', $wpContent . ',' . $wpContent . '/' . $wpPlugins . ',' . $wpContent . '/' . $wpThemes . ',' . $wpContent . '/' . $wpUploads);
178
179 if (!defined('SG_WP_OPTIONS_MIGRATABLE_VALUES')) {
180 define('SG_WP_OPTIONS_MIGRATABLE_VALUES', 'user_roles');
181 }
182 if (!defined('SG_WP_USERMETA_MIGRATABLE_VALUES')) {
183 define('SG_WP_USERMETA_MIGRATABLE_VALUES', 'capabilities,user_level,dashboard_quick_press_last_post_id,user-settings,user-settings-time');
184 }
185 if (!defined('SG_MISC_MIGRATABLE_TABLES')) {
186 define('SG_MISC_MIGRATABLE_TABLES', SG_ENV_DB_PREFIX . 'options,' . SG_ENV_DB_PREFIX . 'usermeta');
187 }
188 if (!defined('SG_MULTISITE_TABLES_TO_MIGRATE')) {
189 define('SG_MULTISITE_TABLES_TO_MIGRATE', SG_ENV_DB_PREFIX . 'blogs,' . SG_ENV_DB_PREFIX . 'site');
190 }
191 if (!defined('SG_SUBDOMAIN_INSTALL')) {
192 define('SG_SUBDOMAIN_INSTALL', defined('SUBDOMAIN_INSTALL') ? SUBDOMAIN_INSTALL : false);
193 }
194
195 define('SG_BACKUP_PRODUCTS_URL', 'https://www.jetbackup.com/jetbackup-for-wordpress');
196