Advanced WordPress Reset - Version 1.0.1

Version Description

  • The plugin is now Reactivated after the reset
  • Adding "Successful Reset" message
Download this release

Release Info

Developer symptote
Plugin Icon 128x128 Advanced WordPress Reset
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.0.1

README.txt CHANGED
@@ -1,23 +1,25 @@
1
  === Advanced WordPress Reset ===
2
  Contributors: symptote
3
  Donate Link: http://www.sigmaplugin.com/donation
4
- Tags: plugin, plugins, plugin wordpress, wordpress, database, database reset, reset database, reset, wordpress reset, reset wordpress, wp reset, reset wp, fresh, installation, clean database, database clean, clean, clean-up, clean up, cleanup, cleaner, admin, default, developer, restore, status, setup, wp-admin
5
- Requires at least: 3.0
6
- Tested up to: 4.5
7
- Stable tag: 1.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Reset your WordPress database back to its first original status, just like if you make a fresh installation.
12
 
13
  == Description ==
14
 
15
- 'Advanced WordPress reset' plugin will reset you WordPress Database back to its first original status in order to make a fresh installation without going through WordPress traditional installation. This plugin will help you saving time especially if you are a developer and you have to install WordPress from scratch each time.
 
 
16
 
17
  = Main Features =
18
- * Make a fresh installation without going through the 5 minutes WordPress installation
19
  * Resets the database without deleting or modifying any of your files (all your WordPress, plugins and themes files are kept)
20
- * Deletes all database customizations made by plugins and themes.
21
  * Deletes all content including post, pages, options, etc.
22
  * Detects the Admin user and recreate it with its saved password
23
  * Keeps the blog name after the reset
@@ -26,9 +28,6 @@ Reset your WordPress database back to its first original status, just like if yo
26
  = Multisite Support =
27
  * Actually the plugin does not support Multisite installation. We will add it as soon as possible.
28
 
29
- = Our other plugins =
30
- * <a href="https://wordpress.org/plugins/advanced-database-cleaner" target="_blank">Advanced Database Cleaner</a>
31
-
32
  == Installation ==
33
 
34
  This section describes how to install the plugin and get it working.
@@ -44,13 +43,17 @@ This section describes how to install the plugin and get it working.
44
 
45
  == Changelog ==
46
 
 
 
 
 
47
  = 1.0.0 =
48
  * First release: Hello world!
49
 
50
  == Frequently Asked Questions ==
51
 
52
  = What does mean "reset my database"? =
53
- This option will reset your WordPress database back to its first original status, just like if you make a fresh installation. That is to say, a clean installation without any content or customizations
54
 
55
  = Is it safe to reset my database? =
56
  Yes, it is safe since you have no important content to lose. If there are any issues, we will support you :)
1
  === Advanced WordPress Reset ===
2
  Contributors: symptote
3
  Donate Link: http://www.sigmaplugin.com/donation
4
+ Tags: database, reset database, reset, clean, restore
5
+ Requires at least: 4.0
6
+ Tested up to: 4.9
7
+ Stable tag: 1.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Reset and restore your WordPress database back to its first original status, just like if you make a fresh installation.
12
 
13
  == Description ==
14
 
15
+ Notice: If you are looking for cleaning up your database, use instead our plugin: <a href="https://wordpress.org/plugins/advanced-database-cleaner" target="_blank">Advanced Database Cleaner</a>
16
+
17
+ 'Advanced WordPress reset' plugin will reset you WordPress Database back to its first original status in order to make a fresh installation without going through WordPress traditional installation. This plugin will help you saving time especially if you are a developer and you have to install WordPress from scratch every time.
18
 
19
  = Main Features =
20
+ * Make a new installation without going through the 5 minutes WordPress installation
21
  * Resets the database without deleting or modifying any of your files (all your WordPress, plugins and themes files are kept)
22
+ * Deletes all database customizations made by plugins and themes
23
  * Deletes all content including post, pages, options, etc.
24
  * Detects the Admin user and recreate it with its saved password
25
  * Keeps the blog name after the reset
28
  = Multisite Support =
29
  * Actually the plugin does not support Multisite installation. We will add it as soon as possible.
30
 
 
 
 
31
  == Installation ==
32
 
33
  This section describes how to install the plugin and get it working.
43
 
44
  == Changelog ==
45
 
46
+ = 1.0.1 =
47
+ * The plugin is now Reactivated after the reset
48
+ * Adding "Successful Reset" message
49
+
50
  = 1.0.0 =
51
  * First release: Hello world!
52
 
53
  == Frequently Asked Questions ==
54
 
55
  = What does mean "reset my database"? =
56
+ This option will reset your WordPress database back to its first original status, just like if you make a new installation. That is to say, a clean installation without any content or customizations
57
 
58
  = Is it safe to reset my database? =
59
  Yes, it is safe since you have no important content to lose. If there are any issues, we will support you :)
advanced-wp-reset.php CHANGED
@@ -4,8 +4,8 @@ if (!defined('ABSPATH') || !is_main_site()) return;
4
  /*
5
  Plugin Name: Advanced WordPress Reset
6
  Plugin URI: http://sigmaplugin.com/downloads/advanced-wordpress-reset
7
- Description: Resets your WordPress database back to its first original status, just like if you make a fresh installation.
8
- Version: 1.0.0
9
  Author: Younes JFR.
10
  Author URI: http://www.sigmaplugin.com
11
  Contributors: symptote
@@ -20,6 +20,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
20
  ********************************************************************/
21
  if (!defined("DBR_PLUGIN_VERSION")) define("DBR_PLUGIN_VERSION", "1.0.0");
22
  if (!defined("DBR_PLUGIN_DIR_PATH")) define("DBR_PLUGIN_DIR_PATH", plugins_url('' , __FILE__));
 
23
 
24
  /********************************************************************
25
  * Load language
@@ -87,6 +88,11 @@ function DBR_main_page_callback(){
87
  _e('You do not have sufficient permissions to access this page.','advanced-wp-reset');
88
  die();
89
  }
 
 
 
 
 
90
  ?>
91
  <div class="wrap">
92
  <h2>Advanced WordPress Reset</h2>
4
  /*
5
  Plugin Name: Advanced WordPress Reset
6
  Plugin URI: http://sigmaplugin.com/downloads/advanced-wordpress-reset
7
+ Description: Reset your WordPress database back to its first original status, just like if you make a fresh installation.
8
+ Version: 1.0.1
9
  Author: Younes JFR.
10
  Author URI: http://www.sigmaplugin.com
11
  Contributors: symptote
20
  ********************************************************************/
21
  if (!defined("DBR_PLUGIN_VERSION")) define("DBR_PLUGIN_VERSION", "1.0.0");
22
  if (!defined("DBR_PLUGIN_DIR_PATH")) define("DBR_PLUGIN_DIR_PATH", plugins_url('' , __FILE__));
23
+ if (!defined("DBR_PLUGIN_BASENAME")) define("DBR_PLUGIN_BASENAME", plugin_basename(__FILE__));
24
 
25
  /********************************************************************
26
  * Load language
88
  _e('You do not have sufficient permissions to access this page.','advanced-wp-reset');
89
  die();
90
  }
91
+ if(array_key_exists('reset-db', $_GET)){
92
+ echo '<div id="DBR_message" class="updated notice is-dismissible"><p>';
93
+ _e('Your database has been reset successfully!','advanced-wp-reset');
94
+ echo '</p></div>';
95
+ }
96
  ?>
97
  <div class="wrap">
98
  <h2>Advanced WordPress Reset</h2>
includes/functions.php CHANGED
@@ -35,12 +35,14 @@ function DBR_wp_reset(){
35
  if ( $get_user_meta( $user_id, $wpdb->prefix . 'default_password_nag' ) ){
36
  $update_user_meta( $user_id, $wpdb->prefix . 'default_password_nag', false );
37
  }
 
 
38
  // Clear all cookies associated with authentication
39
  wp_clear_auth_cookie();
40
  // Set the authentication cookies based User ID
41
  wp_set_auth_cookie( $user_id );
42
  // Redirect user to admin pannel
43
- wp_redirect( admin_url());
44
  }
45
 
46
  ?>
35
  if ( $get_user_meta( $user_id, $wpdb->prefix . 'default_password_nag' ) ){
36
  $update_user_meta( $user_id, $wpdb->prefix . 'default_password_nag', false );
37
  }
38
+ // Reactivate the plugin
39
+ @activate_plugin(DBR_PLUGIN_BASENAME);
40
  // Clear all cookies associated with authentication
41
  wp_clear_auth_cookie();
42
  // Set the authentication cookies based User ID
43
  wp_set_auth_cookie( $user_id );
44
  // Redirect user to admin pannel
45
+ wp_redirect( admin_url()."tools.php?page=advanced_wp_reset&reset-db=done");
46
  }
47
 
48
  ?>
includes/reset.php CHANGED
@@ -33,7 +33,7 @@ if (!isset($DBR_admin->user_login ) || $DBR_admin->user_level < 10 ){
33
  <div class="DBR-box-info">
34
  <ul>
35
  <li><?php _e('The reset does not delete or modify any of your plugins/themes files or server files.','advanced-wp-reset'); ?></li>
36
- <li><?php _e('All your plugins will be deactivated (including this one). You should activate them manually after the reset.','advanced-wp-reset'); ?></li>
37
  <li>
38
  <?php
39
  if($DBR_admin_exists){
33
  <div class="DBR-box-info">
34
  <ul>
35
  <li><?php _e('The reset does not delete or modify any of your plugins/themes files or server files.','advanced-wp-reset'); ?></li>
36
+ <li><?php _e('All your plugins will be deactivated except this one. You should activate them manually after the reset.','advanced-wp-reset'); ?></li>
37
  <li>
38
  <?php
39
  if($DBR_admin_exists){