Skip to content

Commit

Permalink
Added DB_CHARSET and DB_COLLATE constants to the wp-config.php (ddev#…
Browse files Browse the repository at this point in the history
…3768) [skip ci]
  • Loading branch information
rawdreeg committed May 5, 2022
1 parent a9d725d commit a9a72be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ddevapp/wordpress.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ type WordpressConfig struct {
SiteSettings string
SiteSettingsDdev string
AbsPath string
DbCharset string
DbCollate string
}

// NewWordpressConfig produces a WordpressConfig object with defaults.
Expand All @@ -60,6 +62,8 @@ func NewWordpressConfig(app *DdevApp, absPath string) *WordpressConfig {
SiteSettings: "wp-config.php",
SiteSettingsDdev: "wp-config-ddev.php",
AbsPath: absPath,
DbCharset: "utf8",
DbCollate: "",
}
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/wordpress/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
* @package ddevapp
*/

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', '{{ $config.DbCharset }}' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '{{ $config.DbCollate }}' );

/** Authentication Unique Keys and Salts. */
define( 'AUTH_KEY', '{{ $config.AuthKey }}' );
define( 'SECURE_AUTH_KEY', '{{ $config.SecureAuthKey }}' );
Expand Down

0 comments on commit a9a72be

Please sign in to comment.