0

TLDR:

How do I re download / re generate the base Craft CMS folders / files if they are missing from a project? I know you can clone the base Craft CMS project from github (this might be the answer?)

Premis

I have a project that was stored in GitLabs but only contains the basic folders for the Craft Projects (I.e. the custom or project specific folders/files):

enter image description here

As you can it is missing mostly all of the major folders / files for Craft CMS.

As I am wanting to do some local work using DDEV I was wondering if there is a Best practice approach to getting the base Craft cms folders / files into the local development area and then applying the project repo and importing the db?

I assume it would be to download a fresh Craft CMS install via git clone and then pull this repo over the top of it?

Any advice would be great.

1 Answer 1

1

You are "missing" the vendor/ directory and a .env file. I say "missing" in quote marks because typically you wouldn't include those things in a repository (check the .gitignore file to see all the things that are excluded from your repo).

To get up and running, you'll need to run composer install locally on the command line, which will create and populate a vendor directory based on your composer.lock file, and then create a file called .env and populate it with your preferred local environment settings and database connection credentials. It looks like you have a .env.live file in there which might give you a good starting point. (Usually that file would be called .env.example and would serve as a boilerplate for any new developers to create their own .env file.

1
  • Yeah great - so I had already done those steps, but was stupidly trying to import the DB via DDEV php craft db/restore instead of DDEV import-db --src=<Path to DB> Thanks for your help!
    – Wally
    Aug 1 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.