TLDR Code Snippet
|
|
Step-by-step breakdown
(complete steps screenshot can be found at: here)
Step-1: configuration initialisation and start environment
To begin with, you will need to get a copy of the project’s filebase to your local computer, navigate to the project’s folder, and initialize the ddev configuration file there using the ddev config --project-type drupal
command:
|
|
*Optionally, you may also enter argument, such as project’s name and php’s verison, at the time of writting this post, by default, the project’s name fill be the folder’s name, and php version will be php 8.3.0
(You may find a full list of the argument at: here):
|
|
Once, the command finishes running, there’ll be a new \.ddev
directory created on the root of your project folder, and you will be able to start the project via running ddev start
, of which will start the docker container:
Step-2: install dependencies (inc. drush/drush)
Next we’ll use the ddev composer
command to install the required dependencies for ddev:
|
|
And you can even enable them using the ddev drush
command once drush gets installed:
|
|
Step-3: import database and login as admin
Lastly, to recover the project/website’s content, you also need to get a copy of the project’s database, and import it via the ddev import-db
command:
|
|
And lastly launch the project running via ddev via your browser, and login using the root user:
|
|