AnsPress_Cli::upgrade( array $args, mixed $assoc_args )

Description #

Upgrade AnsPress 3.x data to 4.x.

Warning! This will delete/edit/rename lots of mysql rows and tables, so make sure to do a full backup before running this command.

OPTIONS

[–yes] : Passing this will not ask for backup confirm.

EXAMPLES

wp anspress upgrade --yes

Parameters #

  • $args
    array (Required) Arguments.
  • $assoc_args
    mixed (Required) Options.

Source #

File: lib/class-anspress-cli.php

	public function upgrade( $args, $assoc_args ) {
		print( "=== Starting upgrade process ===\n\r" );

		// Confirm before proceeding.
		WP_CLI::confirm( 'Make sure you had backed up your website before starting upgrade process. Do you wish to proceed further?', $assoc_args );

		AnsPress_Upgrader::get_instance();

		print( "\n\r=== Upgrade process completed ===\n\r" );
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment