ddev

Renaming a ddev project


We are a group of developers that work on multiple ddev projects. Some of these projects have a "." in their name, which by now breaks the PhpStorm integration.

Is there an easy way to rename a project and allow all other developers to tell ddev (after they pulled the new ddev config.yaml), what the previous project name was, so data (like database) could be migrated?


Solution

  • Please use the instructions in the DDEV FAQ "How can I change a project's name?"

    Use this process:

    1. Export the database of the project: ddev export-db --file=/path/to/db.sql.gz
    2. ddev delete <project>. By default this will make a snapshot, which is a nice safety valve.
    3. Rename the project: ddev config --project-name=<new_name>
    4. ddev start
    5. ddev import-db --file=/path/to/db.sql.gz