# Run local

## Install in MAMP, WAMP, XAMMP

You  can easily install the project locally if you use [MAMP](https://www.mamp.info/), [WAMP](https://sourceforge.net/projects/wampserver/) (Window only) or [XAMMP](https://www.apachefriends.org/download.html).&#x20;

In this example / guide, we will use [MAMP](https://www.mamp.info/),  but should be similar in the other tools.&#x20;

### Step 1 - Setup MAMP

First, extract the  zip that contains the project source code, that you download from CodeCanyon.

&#x20;Next install MAMP on you computer.

You will be  presented with screen like this one.&#x20;

Make sure PHP version is 8.1+

Then click on preferences

<div align="left"><figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FtrLHHNCbGVCti7HybEwl%2Fpref.png?alt=media&#x26;token=c4868d4b-6d7d-4d5e-be02-de0d6436bf22" alt=""><figcaption></figcaption></figure></div>

Go in the server tab, and in the  "Document root" choose the folder  where you extracted the code.

Click OK. &#x20;

<div align="center"><figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FY4H5rhxjtyG5AEgCceV3%2FCleanShot%202023-04-02%20at%2000.22.36.jpeg?alt=media&#x26;token=2b90cdd7-dfa6-499c-bdb2-f3963014ac84" alt=""><figcaption></figcaption></figure></div>

MAMP  is now set up.&#x20;

Click on  start button and then on WebStart button.&#x20;

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2F8Csmu8KaqcfLhEGPSWzj%2Fstart2.png?alt=media&#x26;token=052ebb84-6a7b-45bc-8bcf-9d0ecb4045e6" alt=""><figcaption></figcaption></figure>

### Step 2 - Database creation

You  will be presented with  a page like this one.&#x20;

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2F1j3QZcabo2QETTslkbf3%2FCleanShot%202023-04-02%20at%2001.13.14%402x.png?alt=media&#x26;token=ad70c288-081f-4d3e-89a1-a44410189152" alt=""><figcaption><p>Click on  Tools -> phpMyAdmin to create your database. </p></figcaption></figure>

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FqODqBP6hFrE07FTQfliZ%2FCleanShot%202023-04-02%20at%2001.14.16%402x.png?alt=media&#x26;token=c09abc38-fce0-4fb2-844c-f9d3e7dee662" alt=""><figcaption><p>Click on new, and then enter your database name. Remember the name</p></figcaption></figure>

### Step 3 - Install

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2F44knfF72a3OImghypUp8%2FCleanShot%202023-04-02%20at%2001.14.51%402x.png?alt=media&#x26;token=857c10e4-b71f-4a32-ad64-df105aab9a85" alt=""><figcaption><p>Next, go back to  start page, and click on "My Website"</p></figcaption></figure>

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FTXhj6S3G8bp8SxCJZiYc%2FCleanShot%202023-04-02%20at%2001.15.24%402x.png?alt=media&#x26;token=e6750512-a833-4bae-b661-eb46e8928c32" alt=""><figcaption><p>Install will now start. Click on "Next step"</p></figcaption></figure>

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FiTCW6l5Chk757TS254kH%2FCleanShot%202023-04-02%20at%2001.15.52%402x.png?alt=media&#x26;token=be036fff-2a48-4342-b0e1-5208c614f476" alt=""><figcaption><p>In case you get permission errors. Open the file manager and change permission on the folders</p></figcaption></figure>

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FR2fAHZgem21SN0K52jAP%2FCleanShot%202023-04-02%20at%2001.17.21%402x.png?alt=media&#x26;token=8d0c0634-c428-4839-8352-d33ee924a298" alt=""><figcaption><p>Do this for all the listed folders</p></figcaption></figure>

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2F95BXxJMbjqPKhQl5Yyzv%2FCleanShot%202023-04-02%20at%2001.19.04%402x.png?alt=media&#x26;token=fae1eb14-3005-4a69-84e7-30d98acac7ca" alt=""><figcaption><p>After permissions are ok, click on "Next step"</p></figcaption></figure>

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FAgwvuMda6fGk0exy8OMn%2FCleanShot%202023-04-02%20at%2001.21.22%402x.png?alt=media&#x26;token=0832cc2e-c590-4603-8855-bd5e2d1dc8f7" alt=""><figcaption><p>Enter database port, and database name. Enter desired admin user and pass.</p></figcaption></figure>

There are two other screens, that you can click on "Next step"

After that install is done

<figure><img src="https://3600783004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTevOI9DHovjqWPEjfDXi%2Fuploads%2FGWprOdiyNgP9jgVn310F%2FCleanShot%202023-04-02%20at%2001.22.12%402x.png?alt=media&#x26;token=2a9eb295-bc8c-4ead-aeb8-98c9fe3768eb" alt=""><figcaption><p>You can visit the landing page. or the login page</p></figcaption></figure>

You can visit the landing page. or the login page

## Run local - Docker way

From Laravel 8, there is a new package available called <https://laravel.com/docs/8.x/sail>.

We use this to run the site locally and test it.

#### Step 1 - Install Docker

All you need is to install <https://www.docker.com/> on your computer.

After that extract the code and open it in the Terminal / Command prompt

```
cd PROJECT_NAME
./vendor/bin/sail up
```

The first time you run this can take some time

#### Step 2 - Install via CMD

After sail is running, open a new terminal window and navigate to the project.

execute

```
sail artisan migrate --fresh --seed
```

This will set up ( seed ) the database.

Then execute / run

```
cd storage
touch installed
```

This should create an empty file in **storage** folder, to let the system know that the project is installed. Then open the site on [localhost](http://127.0.0.1).

You should see the site now

Login with the default credentials

**Username**: <admin@example.com>

**Password**: secret
