We experienced issues with replacing constants in wp-config.php using regular expressions. E.g. it may stop working when new WP release changes default contents of the wp-config.php Using WP CLI seems to be more reliable way of doing it. [MAILPOET-4511]