Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/plugins/TaskRunner/WordPressApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ class WordPressApp extends LAMPApp {
` sed -i "1i${this.wordpressConfigOverride()}" /var/www/html/wp-config.php`,
` sed -i "$(echo $WP_CONFIG_WPSETTINGS_LINE_NUMBER)i\\$table_prefix = '${this.options.databasePrefix}';" /var/www/html/wp-config.php`,
'fi',

// Prepend the probo-config.php file to the wp-config file.
`sed -i "1i <?php require(dirname(__FILE__) . '/probo-config.php'); ?>" /var/www/html/wp-config.php`,

// Create the probo-config file to override any user defined settings.
`echo "<?php`,
`define('DB_NAME', '${this.databaseName}');`,
`define('DB_USER', '${constants.DATABASE_USER}');`,
`define('DB_PASSWORD', '${constants.DATABASE_PASSWORD}');`,
`define('DB_HOST', 'localhost');`,
`?>" >> /var/www/html/probo-config.php;`,
]);

// The boilerplate is significantly more simple.
Expand Down