PHP code example of foogile / wp-cli-mig
1. Go to this page and download the library: Download foogile/wp-cli-mig library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
foogile / wp-cli-mig example snippets
// filename: migrations/1_FirstMigration.php
namespace WpCliMigrate;
use Foogile\WpCli\Migrate\MigrationInterface;
class FirstMigration implements MigrationInterface
{
public function up()
{
// Do some work using WordPress API
}
public function down()
{
// Undo some work using WordPress API
}
}