A configuration for lightscale/migrator that enabled it to work in a wordpress
theme or plugin. It provides the class Lightscale\Migrator\Config\Wordpress
.
This should be installed from packagist with composer:
$ composer require lightscale/migrator-config-wordpress
To use it install Lightscale/Migrator into the your plugin or themes directory.
Then create a config file migrator_config.php
in the root of the directory.
This file needs to look something like this:
<?php
use Lightscale\Migrator\Config\Wordpress;
$config = new Wordpress('textdomain', __DIR__);
return $config->config();
__construct($namespace, $base_dir, $directory = 'dbmigrations', $load_path = '../../../wp-load.php')
- $namespace (string) - is the text domain that is used to create a key in the wp_options table.
- $base_dir (string) - is the directory that is the base of install. Relative to config. Can be DIR
- $directory (string) - is the directory when the migrations are stored.
- $load_path (string) - is the path to wp-load.php for initialising wordpress with the commandline migrator tool.
return - the config array to return from the migrator_config.php file.
- 0.0.2 Added base_dir functionality
- 0.0.1 All core functionality working. Still in on-going development.
- PHP 7.1.3
- Composer
Sam Light
This project is licensed under the GPLv3 License - see the LICENSE file for details.