# Git clone the repo

Now we want to remove all wordpress files generated by Local and replace them with the files from the github repo.

<figure><img src="https://2336033317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRZBPVHe4q0MJV3yhChBq%2Fuploads%2FCP0o9ma3S6DJZRvPabyO%2Fimage.png?alt=media&#x26;token=2411cff9-fe19-436b-b859-bdc9ff1b051f" alt=""><figcaption></figcaption></figure>

When you it the site shell it will take you to the public directory in the terminal.

`Macintosh HD/Users/User_Name/Local Sites/vmgd/app/public`

<figure><img src="https://2336033317-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRZBPVHe4q0MJV3yhChBq%2Fuploads%2FYRWgOL6rcSQxBejrgSkV%2Fimage.png?alt=media&#x26;token=187e5049-a5f7-40b7-a6db-317d6256250b" alt=""><figcaption></figcaption></figure>

We're going to delete the public folder and replace with the github repo

Public folder is currently where local expects Wordpress website to be. We will replace the public folder with git hub repo files.

Run the following commands in one command. The reason to run them in one command is if the git clone command fails you still have the public folder:

`cd ..`\
`rm -rf public`\
`git clone git@github.com:what-works-global/vmgd.git public`

Edit site.conf.hbs

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfle8CCI_z1fjYioPvMq2wtGTrOomWnZsfSsjoss1Nw4td3HlxVMqQ08bzUba9SolsIoObY0p21BgYut1AJ6M9wUtdP3N-ajaFKRbTdlXzXFuE_tOw7YaFc8Y-_35Ijd0S84lZtUd5c-LHzhrK8CdcJOqGj?key=U1RQd9mB3toAGQPdwrBtFQ" alt=""><figcaption></figcaption></figure>

Open the file with the Visual Studio Code.

Change:

`root   "{{root}}";`

To:

`root   "{{root}}/wordpress";`

Now Local knows the directory containing all the wordpress files is in a sub-directory of the public folder.

Possible Cases and Errors:

When it says permission denied:

stop the site in local (so that it doesn't recreate after you already deleted it)

and after that use the following commands in the terminal

`sudo rm -rf public`

which will remove the public directory.

When it says public folder not found:

Go to this directory

`Macintosh HD/Users/User_Name/Local Sites/vmgd`

cmd + Right click and open the app folder directory in the new terminal

and paste the following command in the terminal.

`git clone git@github.com:what-works-global/vmgd.git public`

\ <br>

<br>
