/**
 * Deactivation is a two-step process with a warning screen. See
 * `vp_admin_post_cancel_deactivation()` and `vp_admin_post_confirm_deactivation()`
 *
 * @see vp_admin_post_confirm_deactivation()
 * @see vp_admin_post_cancel_deactivation()
 */
function vp_deactivate()
{
    if (defined('WP_CLI') || !VersionPress::isActive()) {
        vp_admin_post_confirm_deactivation();
    } else {
        wp_safe_redirect(admin_url('admin.php?page=versionpress/admin/deactivate.php'));
        die;
    }
}
 /**
  * Removes everything created by VP, leaves site fresh for new testing.
  *
  * ## DETAILS
  *
  * Basically does plugin deactivation, removing the Git repo and plugin activation.
  * Deactivation does things like removing `vpdb`, `db.php`, VersionPress db tables etc.
  *
  * @subcommand start-over
  */
 public function startOver($args, $assoc_args)
 {
     vp_admin_post_confirm_deactivation();
     FileSystem::remove(ABSPATH . '.git');
     activate_plugin('versionpress/versionpress.php');
 }