PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 3.7.1
WP STAGING – WordPress Backup, Restore, Migration & Clone v3.7.1
4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / install.php
wp-staging Last commit date
Backend 2 years ago Backup 2 years ago Basic 2 years ago Core 2 years ago Duplicator 2 years ago Framework 2 years ago Frontend 2 years ago assets 2 years ago languages 3 years ago vendor_wpstg 2 years ago Deactivate.php 2 years ago README.md 3 years ago SECURITY.md 2 years ago autoloader.php 3 years ago bootstrap.php 2 years ago constantsFree.php 2 years ago freeBootstrap.php 2 years ago install.php 2 years ago opcacheBootstrap.php 2 years ago readme.txt 2 years ago runtimeRequirements.php 2 years ago uninstall.php 2 years ago wp-staging-error-handler.php 2 years ago wp-staging.php 2 years ago
install.php
65 lines
1 <?php
2 /**
3 * This file is hooked as the \register_activation_hook of the plugin,
4 * therefore it runs as a standalone script that needs to be bootstrapped.
5 *
6 * @var string $pluginFilePath The absolute path to the main file of this plugin.
7 */
8
9 use WPStaging\Backend\Optimizer\Optimizer;
10 use WPStaging\Core\Cron\Cron;
11 use WPStaging\Core\DTO\Settings;
12 use WPStaging\Core\Utils\Htaccess;
13
14 if (!class_exists('WPStaging\Core\Cron\Cron')) {
15 return;
16 }
17
18 /**
19 * Register Cron Events
20 */
21 $cron = (new Cron)->scheduleEvent();
22
23 /**
24 * Install the Optimizer
25 */
26 $optimizer = (new Optimizer)->installOptimizer();
27
28 /**
29 * Add the transient to redirect for class Welcome (Not for multisites) and not for Pro version
30 */
31 if (!defined('WPSTGPRO_VERSION')) {
32 set_transient('wpstg_activation_redirect', true, 3600);
33 }
34
35 /**
36 * Create Htaccess
37 */
38 $htaccess = new Htaccess();
39 if (extension_loaded('litespeed')) {
40 $htaccess->createLitespeed(ABSPATH . '.htaccess');
41 }
42
43 /**
44 * Set default values for settings
45 */
46 $settings = (new Settings())->setDefault();
47
48 /**
49 * Add plugin install for free or pro version in wp options table.
50 * If that option already exists do not overwrite it to always keep it
51 */
52 if (defined('WPSTGPRO_VERSION')) {
53 add_option('wpstgpro_install_date', date('Y-m-d h:i:s'));
54 } else {
55 add_option('wpstg_free_install_date', date('Y-m-d h:i:s'));
56 }
57
58 // @deprecated since 13.10.2022 Remove in 2023
59 add_option('wpstg_installDate', date('Y-m-d h:i:s'));
60
61 /**
62 * Register the Cron Events for Scheduled Backups
63 */
64 WPStaging\Core\WPStaging::make(\WPStaging\Backup\BackupScheduler::class)->reCreateCron();
65