-
Notifications
You must be signed in to change notification settings - Fork 1
/
wp-cli-local.php
31 lines (24 loc) · 1.04 KB
/
wp-cli-local.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* The Local WP CLI configuration.
*
* @package Dekode
*/
declare( strict_types = 1 );
// Application root directory.
$app_root = __DIR__;
// Autoload Composer packages.
require_once $app_root . '/vendor/autoload.php';
// Load environment variables.
if ( file_exists( $app_root . '/.env' ) ) {
$dotenv = new \Symfony\Component\Dotenv\Dotenv();
$dotenv->load( $app_root . '/.env' );
}
define( 'DB_USER', $_ENV['DB_USER'] ?? 'root' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
define( 'DB_PASSWORD', $_ENV['DB_PASSWORD'] ?? 'root' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
// Only display fatal run-time errors.
// See http://php.net/manual/en/errorfunc.constants.php.
error_reporting( E_ERROR ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting, WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting
// Disable WordPress debug mode.
// See https://codex.wordpress.org/WP_DEBUG.
define( 'WP_DEBUG', false );