How to ignore content folder in deployment

Hi everyone,
I noticed that if I make changes in my website and upload it again to the server, it overrides the content that has been added to the server website through the panel.

How can I make changes and still keep the content in the server site?

I tried to use the .gitignore file: I added the line: /content/home/* - but the effect is that it delets the content in the home folder (and not ignoring it)

I would appreciate any help! thanks in advance :slight_smile:

How do you deploy to the server?

Thanks for the reply,

I use github and deploy to heroku

You would have to remove and then .gitignore the complete content folder.

The alternative would be to commit all remote content changes to the repo as well (GitHub - thathoff/kirby-git-content: Commit and Push changes made via the Panel).

I still can’t manage to figure it out. I must confess that I’m a total beginner in github and kirby.
This is what I did:

  1. I used this to remove the files:
    git rm --cached content -r

  2. I added this line to the .gitignore file:

  3. I pushed to server and content was deleted from the server site.

  4. I added content through the panel to the server site

  5. I made css changes in my files and pushed it to server and unfortunately the content was deleted again.

What am I doing wrong?
thanks for the help :pray:

The problem is that all changes arw always deleted when you push changes to Heroku. This doesn’t only affect changes to content, but also user accounts etc. Heroku doesn’t support persistent file storage, see Why are my file uploads missing/deleted? - Heroku Help

Oh I see,
So you don’t recommend using heroku with kirby?

(I’m not a backend developer and I definitely don’t know how to use s3 and data bases)

I think Heroku is not well suited for Kirby, at least not if you want to make changes via the Panel. But also things like caching or thumbs might not work as expected.

thanks for your help!

I’m a bit confused about how to upload kirby to a shared hosting. Up until now I was uploading files to bluehost cPanel and I’m embarrassed to say that I was trying to do the same with my kirby app but it didn’t work.

Is there a different way to upload my site? or maybe is there an equivalent type of app that I can look on google how to upload it - for instance: ‘how to upload (php website?) to a shared hosting’ ?
is php website is the right term?

thank you!

All you need to do is upload your project to the webroot of your shared hosting. You can do that via sftp for example using a tool like Cyberduck (all OS), Transmit (Mac), Filezilla etc. (if you have set up SSH connection). Using cPanel should also work, but you have to make sure to upload all files (including the hidden .htaccess if you are on Apache). Looks like Bluehost also has an integrated FTP tool.

Thank you so much for your help!

I succeeded to upload my site to bluehost through the cPanel.

If I would use one of the examples you have mentioned I could update my site without overriding my content folder?

You can do that via sftp for example using a tool like Cyberduck (all OS), Transmit (Mac), Filezilla etc