Integration wp-config file in Wordpress for switch environment: local
, staging
and production
development.
- Copy repository on Wordpress root.
git clone https://github.com/ffranz/wp-config.git
- Replace
DEFINE
variables inwp-config.php
with this:
require('wp-config/wp-environments.php');
- Change variable on
.local
,.staging
and.production
file.
define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
- Enjoy!