Is there a smart (or at least conventional) way to set up your Kirby website's versions (development/production)?

*Amateur Time :slight_smile: *

I am wondering if there is a smart way to organize different versions of one’s website, when working with Kirby and how to handle these versions and the license.

So how I’m doing it at the moment is:

  • I start building a kirby project live on a server (with Atom and the FTP-Remote-Edit plugin), usually in a subfolder, like

  • At some point i clone the whole kirby folder and rename it (and make some changes to .htaccess, config, etc. accordingly) to create

  • To release version 1 I create an index.php or .htaccess that redirects from to on the highest folder level.

  • I then keep working on the version until I release a new clone under, replace the content folder, change the redirect, etc, etc

So at some point I have many autonomously coexisting, publicly available Kirby folders on my server like this:

On the upside this feels very neat, I can keep the old versions as backups, also this way I can easily compare them among each other.

But then again there must be a smarter way. Maybe with a shared content folder? And would all versions need an individual license?
How is this normally done? Do other people develop their website locally and only have the latest version online?
Are there some best practices? I don’t even know what to google :see_no_evil:

For context: I’m talking about rather small websites with 1-2 developers and 1-2 editors using the panel.

I develop only locally and have everything under version control (Git) so no need to deal with different folders.

Then, when a new version is ready, it is deployed to either staging or production.

1 Like

Thank you! I will also try to adapt this workflow for bigger projects. Although I love the immediacy of having a live website changed just by pressing cmd+s, the Git Way seems more mature and thorough.

Also some things that I recently learned about, which I consider super convenient in this regard:

  • using laravel valet
  • having two different config files for your local and server environment
  • using gitignore on the content and media folder to not bloat up github and your computer