Skip to main content

Existing Project

Clone the project

The first step is to clone the existing project from its Git repository onto your local computer/server. This can be done using your preferred software or via the terminal.

Dependencies

Next, you'll need to download the project's dependencies. Navigate to the root of the project in your terminal and execute the following commands:

PHP

Download the PHP packages from the composer.json file:

composer install

Node.js

Download the Node.js packages essential for development and compilation from the package.json file:

yarn install

Database

Create a backup of the live (production) project's database.

Method #1: Through the live site's control panel:

  1. Navigate to the Utilities tab in the sidebar and click on Database Backup.
  2. Ensure the "Download backup" checkbox is selected and click the button.

Method #2: Via SSH:

If you have SSH access to the hosting provider, connect to the database and perform a dump.

Local server and database

  1. Establish a new Host on your local server.
  2. Direct this host to your project's web folder.
  3. Set up a MySQL database. For development purposes, you might consider using the username and password "root/root" as this won't be deployed. Then, import the database tables from the previously dumped backup.

If you're using MAMP Pro, ensure that the "Allow network access to MySQL" option is checked in the MySQL tab.

.env file setup

  1. Duplicate the .env.example file found at the root of your project and rename it to .env.
  2. Enter the development URL of your host and the details of the database you just set up.
  3. Fill out all the required fields in the .env file.