You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 97b4e79
Browse filesBrowse the repository at this point in the historyBrowse files
Combine installation requirements, database location guidance, and the install action in one panel. Clarify that switching does not copy the existing content, while preserving installation guards and Query Monitor support.
<h2><?phpesc_html_e( 'Manage the integration', 'sqlite-database-integration' ); ?></h2>
99
-
<p><?phpesc_html_e( 'Switching to MySQL does not copy your SQLite content.', 'sqlite-database-integration' ); ?></p>
100
-
<details class="sqlite-help"><summary><?phpesc_html_e( 'How to switch to MySQL', 'sqlite-database-integration' ); ?></summary><div>
101
-
<p><?phpesc_html_e( 'Back up your database. Prepare your MySQL database and configuration, and migrate any content you want to keep before switching.', 'sqlite-database-integration' ); ?></p>
102
-
<p>
103
-
<?php
104
-
printf(
105
-
/* translators: 1: Plugins page URL, 2: Drop-in file path relative to the content directory. */
106
-
wp_kses_post( __( 'When ready, <a href="%1$s">deactivate the plugin</a> to remove the SQLite drop-in, or manually remove %2$s. Verify that your content loads correctly from MySQL.', 'sqlite-database-integration' ) ),
<p><?phpesc_html_e( 'This change affects every site in the network.', 'sqlite-database-integration' ); ?></p>
114
-
<?phpendif; ?>
115
-
</div></details>
116
-
</section>
117
-
<?phpelse : ?>
118
-
<?phpsqlite_plugin_render_installation(); ?>
119
-
<?phpendif; ?>
92
+
<section class="sqlite-manage">
93
+
<h2><?phpesc_html_e( 'Manage the integration', 'sqlite-database-integration' ); ?></h2>
94
+
<p><?phpesc_html_e( 'Switching to MySQL does not copy your SQLite content.', 'sqlite-database-integration' ); ?></p>
95
+
<details class="sqlite-help"><summary><?phpesc_html_e( 'How to switch to MySQL', 'sqlite-database-integration' ); ?></summary><div>
96
+
<p><?phpesc_html_e( 'Back up your database. Prepare your MySQL database and configuration, and migrate any content you want to keep before switching.', 'sqlite-database-integration' ); ?></p>
97
+
<p>
98
+
<?php
99
+
printf(
100
+
/* translators: 1: Plugins page URL, 2: Drop-in file path relative to the content directory. */
101
+
wp_kses_post( __( 'When ready, <a href="%1$s">deactivate the plugin</a> to remove the SQLite drop-in, or manually remove %2$s. Verify that your content loads correctly from MySQL.', 'sqlite-database-integration' ) ),
// When "QM_DB" exists, it must have been loaded via the "db.php" file.
136
+
if ( class_exists( 'QM_DB', false ) ) {
137
+
$override_db_dropin = true;
138
+
}
139
+
}
140
+
141
+
$requirements_error = '';
142
+
if ( ! extension_loaded( 'pdo_sqlite' ) ) {
143
+
$requirements_error = __( 'We detected that the PDO SQLite driver is missing from your server (the pdo_sqlite extension is not loaded). Please make sure that SQLite is enabled in your PHP installation before proceeding.', 'sqlite-database-integration' );
<p><?phpecho'public' === $status ? esc_html__( 'The planned database location may be publicly accessible.', 'sqlite-database-integration' ) : esc_html( $location['summary'] ); ?></p>
179
+
<p><a href="<?phpechoesc_url( add_query_arg( 'tab', 'protection', sqlite_plugin_get_admin_page_url() ) ); ?>"><?phpesc_html_e( 'How to protect your database', 'sqlite-database-integration' ); ?></a></p>
180
+
</dd></div>
181
+
</dl>
182
+
<?phpif ( ! $requirements_error ) : ?>
183
+
<div class="sqlite-setup-next">
184
+
<h3><?phpesc_html_e( 'This starts a fresh WordPress site', 'sqlite-database-integration' ); ?></h3>
185
+
<p><?phpesc_html_e( 'Your current content stays in your existing database and is not copied to SQLite. You can return to your previous site by deactivating the plugin. Back up your current site before proceeding.', 'sqlite-database-integration' ); ?></p>
186
+
<?phpif ( is_multisite() ) : ?>
187
+
<p><?phpesc_html_e( 'This change affects every site in the network.', 'sqlite-database-integration' ); ?></p>
188
+
<?phpendif; ?>
189
+
190
+
<?phpif ( $override_db_dropin ) : ?>
191
+
<p>
192
+
<strong>NOTE:</strong>
193
+
<?php
194
+
printf(
195
+
/* translators: %s: db.php drop-in path */
196
+
esc_html__( 'We’ve detected an existing database drop-in file at %s, created by the Query Monitor plugin.', 'sqlite-database-integration' ),
<?phpesc_html_e( 'To enable SQLite support, this file will need to be replaced.', 'sqlite-database-integration' ); ?>
201
+
<?phpesc_html_e( 'The Query Monitor plugin will continue to function correctly after the change. You can safely proceed with the installation.', 'sqlite-database-integration' ); ?>
<p><?phpesc_html_e( 'We detected that the PDO SQLite driver is missing from your server (the pdo_sqlite extension is not loaded). Please make sure that SQLite is enabled in your PHP installation before proceeding.', 'sqlite-database-integration' ); ?></p>
<p><?phpesc_html_e( 'The required PHP extension and file permissions are available. Before installing, choose a database location that your web server does not expose.', 'sqlite-database-integration' ); ?></p>
<p><?phpesc_html_e( 'This plugin will switch to a separate database and install WordPress in it. You will need to reconfigure your site, and start with a fresh site. Disabling the plugin you will get back to your previous MySQL database, with all your previous data intact.', 'sqlite-database-integration' ); ?></p>
334
-
335
-
<?phpif ( $override_db_dropin ) : ?>
336
-
<p>
337
-
<strong>NOTE:</strong>
338
-
<?php
339
-
printf(
340
-
/* translators: %s: db.php drop-in path */
341
-
esc_html__( 'We’ve detected an existing database drop-in file at %s, created by the Query Monitor plugin.', 'sqlite-database-integration' ),
<?phpesc_html_e( 'To enable SQLite support, this file will need to be replaced.', 'sqlite-database-integration' ); ?>
346
-
<?phpesc_html_e( 'The Query Monitor plugin will continue to function correctly after the change. You can safely proceed with the installation.', 'sqlite-database-integration' ); ?>
347
-
</p>
348
-
<?phpendif; ?>
349
-
350
-
<p><?phpesc_html_e( 'By clicking the button below, you will be redirected to the WordPress installation screen to setup your new database', 'sqlite-database-integration' ); ?></p>
0 commit comments