mandrasch/ddev-pull-wp-scripts

Add better support / warnings for wp-config.php quote variants

mandrasch opened this issue · 2 comments

The scripts provided here parses out config settings like DB_NAME from wp-config.php.

See:

Settings for wp-config.php can be written in 3 styles:

// single quotes
define('DB_NAME', 'my-db');

// double quotes
define("DB_NAME", "my-db");

// mixed quotes
define('DB_NAME', "my-db");

Currently only single quotes are supported, which causes problems for users, e.g. #2.

A better regex could get values from all three variants.

If anyone is a pro, I'm happy to receive PRs for this challenge 👍