-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #414 from tristanbes/feature/database-as-dsn
Allow to use a database DSN instead of all the database variables
- Loading branch information
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,12 @@ Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](htt | |
$ composer create-project roots/bedrock | ||
``` | ||
2. Update environment variables in the `.env` file: | ||
* `DB_NAME` - Database name | ||
* `DB_USER` - Database user | ||
* `DB_PASSWORD` - Database password | ||
* `DB_HOST` - Database host | ||
* Database variables | ||
* `DB_NAME` - Database name | ||
* `DB_USER` - Database user | ||
* `DB_PASSWORD` - Database password | ||
* `DB_HOST` - Database host | ||
* You can also use a variable `DATABASE_URL` instead of using all the database variables above, that contains a DSN (ex: `mysql://user:[email protected]:3306/db_name`) | ||
* `WP_ENV` - Set to environment (`development`, `staging`, `production`) | ||
* `WP_HOME` - Full URL to WordPress home (https://example.com) | ||
* `WP_SITEURL` - Full URL to WordPress including subdirectory (https://example.com/wp) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters