Permalink
Browse files

Set database prefix via config.yaml instead

  • Loading branch information...
rmccue committed Nov 25, 2016
1 parent 5946dd2 commit 89f9f265684dd1395167f72b36b68d0424c6ad32
View
@@ -48,6 +48,7 @@ database:
name: wordpress
user: wordpress
password: vagrantpassword
prefix: wp_
# Admin configuration
# (When overriding, include all values)
View
@@ -1,13 +1,6 @@
<?php
// Database constants
// These are probably defined in local-config-db.php
# define( 'DB_NAME', 'local_db_name' );
# define( 'DB_USER', 'local_db_user' );
# define( 'DB_PASSWORD', 'local_db_password' );
# define( 'DB_HOST', 'localhost' ); // Probably 'localhost'
// Custom table prefix
# $table_prefix = 'sz_';
// Note: Database constants are set in the automatically-generated
// local-config-db.php. Change these via your config.local.yaml instead.
// Loopback connections can suck, disable if you don't need cron
# define( 'DISABLE_WP_CRON', true );
@@ -37,6 +37,7 @@
database => $config[database][name],
database_user => $config[database][user],
database_password => $config[database][password],
database_prefix => $config[database][prefix],
network => $config[multisite],
admin_user => $config[admin][user],
admin_email => $config[admin][email],
@@ -7,6 +7,7 @@
$database_user = 'root',
$database_password = 'password',
$database_host = 'localhost',
$database_prefix = 'wp_',
$admin_user = 'admin',
$admin_email = 'admin@example.com',
$admin_password = 'password',
@@ -7,6 +7,8 @@ define( 'DB_USER', '<%= @database_user %>' );
define( 'DB_PASSWORD', '<%= @database_password %>' );
define( 'DB_HOST', '<%= @database_host %>' );
$table_prefix = '<%= @database_prefix %>';
defined( 'ABSPATH' ) or define( 'ABSPATH', '<%= @wpdir %>/' );
defined( 'WP_CONTENT_DIR' ) or define( 'WP_CONTENT_DIR', '<%= @contentdir %>' );
View
@@ -118,8 +118,9 @@
// Table prefix
// Change this if you have multiple installs in the same database
// ==============================================================
if ( empty( $table_prefix ) )
$table_prefix = 'sz_';
if ( empty( $table_prefix ) ) {
$table_prefix = 'wp_';
}
// =====================================
// Errors

0 comments on commit 89f9f26

Please sign in to comment.