Kirby site not loading correctly when copied into git repository

I’m trying to get my head around git and github. I’ve made a repository for my website on github and cloned it to my computer. Then I’ve copied and pasted the contents of my Kirby website folder into the repository.

When I point MAMP’s server to the folder and open the website on a local server it no longer displays correctly. The images point to paths in the media folder that don’t exist, and when I click menu links to different pages it comes up with a “not found” page. None of the structure or files of the website have been changed, just copied across.

Does anyone have any ideas as to why this might be happening and what I can do to fix it?


can you share the gitignore and htaccess file? does home (aka the root) work but no other page? does the panel work?

1 Like

On a side note, you don’t have to copy stuff around: What you can do instead if you do it again:

  1. Create a new repo on GitHub
  2. In your local project, initialize git with git init
  3. Then add the remote with git remote add origin
  4. Add your files
  5. Commit
  6. Push to origin
1 Like

Aha! I had not made the gitignore and htaccess files visible when I copied the folder across so they weren’t present in the repository. I have copied them across now and it all works fine!


1 Like

Ah that sounds very useful, thanks @texnixe! I’ll try that in future :slight_smile: