DDEV Recreates the wp-config File (Solution)

If you are using DDEV, you can create an Development Environment for the Content Management System WordPress out of box. With the CMS Quickstart DDEV will get the latest WordPress Version and set it up for you.

I had one problem with this setup; the wp-config.php file was always recreated when i executed the “ddev start”.

Actually it’s documented on the official ddev documentation, but it’s a bit hidden, that is why i would like mention it here:

You’ll know DDEV is managing a settings file when you see a comment containing #ddev-generated like the one below. Remove the comment and DDEV will not attempt to overwrite it. If you’re letting DDEV create its settings file, we recommended leaving this comment so DDEV can continue to manage it, and make any needed changes in another settings file.

/**
* #ddev-generated: Automatically generated WordPress settings file.
* ddev manages this file and may delete or overwrite the file unless this comment is removed.
* It is recommended that you leave this file alone.
*
* @package ddevapp
*/
No votes yet.
Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *