Error when site was moved

I moved one of my Grav development installations from one Linux PC to another, and now when I try to view it in my local environment I get this error:

Fatal error: Uncaught exception 'RuntimeException' with message 'Please run: <i>bin/grav install</i>' in /opt/lampp/htdocs/projects/cbasites/index.php:11 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/projects/cbasites/index.php on line 11

So, I went into said folder and, after adding the permission to execute, ran ./bin/grav install. As a result, I got this error:

ERROR Missing .dependencies file in user/ folder
ERROR invalid YAML in .dependencies

Any idea what I did wrong and how to fix it?

First error occurs because it couldn’t find the vendor/ folder, so you didn’t move all.

Second error occured because it couldn’t find any .dependencies file at the root of Grav which is included by default.

I suggest you zip up the entire local site, copy it over to your other PC and extract it. That way you will get all the files.

Oh OK, great. Thanks! And I should do the same when uploading it to a server with Git or FTP?

Really you need to ensure that you first have everything you need on the site to run, then you can use FTP/Git to sync the stuff that does potentially change, ie, the user/ folder.

Then you can independently upgrade the system/ folder with Grav’s built-in GPM.

This is what we do on this site.