Update core from the panel

WordPress has both auto updates and updates from wp-admin. I think it could be good with an update button in the panel. If the folder structure is different than normal then Kirby config would now about it and could adapt.

Why update from the panel?

  • When a security threat comes it would be faster to just login to the panel and click update.
  • We don’t need to visit Kirby blog to know when a new version has arrived.
  • Not everyone can update from a GIT repository.

Backup button

This is another feature but a related one. It could backup the files first and compress them as a zip-file, just in case something goes wrong. It’s just files! If you still use a database, that would not be affected with the replacement of files anyway.

It might be a bit of work to make it function, but WordPress did it so it’s possible and they even have database to think about.

Feedback?

Well, I honestly don’t like these WP comparisons too much. Personally, I don’t want Kirby to become a second WP :fearful:

Automatic updates are always a risk and should never be done on a production site, because things might get broken, if only because of plugins that are not compatible anymore but even the core might be changed in a way that might require changes in the code. So we would need panel permissions first that would allow to restrict such a feature anyway. I think automatic updates would be better served as a plugin then core because it would not be needed for people who work with Git anyway.

And I think if you need a backup button, this could probably be achieved through a panel widget?

4 Likes

What do you think about security updates, that don’t change the functions? They would not break the plugins because nothing has really changed, in function.

What do you think about a version notice in the panel, like this:

Kirby 2.01 - Kirby 2.1 available <Read more>

Yes, I don’t expect Kirby to be a second WP, but they are both CMSes and that way comparable. I expect Kirby to be even better! :smile:

Maybe a notification could be integrated without much ado. As regards security updates, I don’t know how often this happens and if such updates can be separated from feature updates in the long run.

And as a side note: I don’t know if Kirby IS better if that is a fitting word anyway, because “better” is not a value as such but must be seen in relation to what you want to achieve, i.e. better suited for a particular use case. I certainly like Kirby much better than WP oder Joomla, and Kirby lets you decide how you want to structure your content and create your own templates fairly easily as compared to WP and the rest … But here’s an addict talking :heart_eyes:

1 Like

I understand that it could help many people, but automatic updates are risky. It can be done in WP, Drupal, and others, but it always come with several warnings (backup first, if you hacked core you changes will be overwritten…).
Even security updates sometimes have to break an API or change the way a function is called, so it may break things anyway.
Also if you don’t use Git, replacing Kirby’s folder (and eventually Panel’s folder) via FTP is dead easy.

But a way to announce updates in the Panel would be nice I think. At least for Kirby core.

1 Like

I’m right beside @texnixe and @malvese on this one. While I can understand how some users might like the auto update feature, or updating from the front end; part of the draw of Kirby (and flat file cms in general) is version control via git without tandem database deployments being necessary. Git deployments can be made so simple with the correct scripts in place.

In my opinion, if someone needs every feature that WordPress offers, perhaps WordPress is the right solution for them or their project. Kirby isn’t going to be the right fit for every person/project, not until there’s 100’s of plugins and widgets, a solid ecommerce solution, and a thousand or so more @texnixe’s on the forums answering all these posts when people have issues.

All that aside, the take away I got from this post was that an “Your version is out of date and is missing key security updates. Please update your installation ASAP.” widget would be beneficial, “without much ado”.

For creating such a widget, one could get the latest release tag from GitHub through their API: https://developer.github.com/v3/repos/releases/#get-the-latest-release

And then compare it to the Kirby version of the core

In conclusion…

People don’t like - Auto update and panel update

No one (so far) would like an auto updating Kirby or a button for updating Kirby in the panel.

People like - Version notice in the panel

People seems to like the idea of a notice in the panel if there is a new version, especially if there are security fixes. If someone will build a widget to try it, just make sure it does not check for a new version on every page load. It should be cached every 24 hours or so.

@Luke If you were refering to me as “someone”, I don’t want every feature that WordPress offers. I have however worked professionally with WordPress since 2007. I like Kirby because it’s NoDB, awesome clever functions and queries made for developers, speed, feels personal, clean HTML, clean panel and more. I switched from WordPress to Kirby 1, then back to WordPress and now I’m probably in a switch for Kirby 2.1.

Not referring to you. Your passion for Kirby is evident on these forums. Someone was a generalization. :slight_smile:

The update notice is a very good idea! I will definitely put that on the todo list for 2.2 or 2.3.

Auto-updating is a HUGE task to make it right. I don’t even want to think about the endless possible permission issues, security concerns with spoofed update sources, broken downloads, etc. etc. — to name just a few possible issues. I rather stay away from this as long as possible to be honest :smile:

What I was thinking about though is a very simple update bash script, which could be included in Kirby’s directory for those who use git. That could help to streamline the update process via Git even more.

4 Likes

Perhaps a widget plugin (or core config option) that connected your installation to a git repository, with a few buttons to push/pull to repo directly in the panel. It appears that would be doable with shell_exec(). Brownie points if it can optionally deploy to a production server with a third button, and/or revert to previous commits.

Would that alleviate most the security concerns? Make new ones?

I fully agree with that! +1

While I think an update notice is a great idea, I don’t think it should be enabled by default.
The site would need to check for updates either using the GitHub API or the Kirby website, each of which necessarily sends data to third-parties. While that’s not a huge deal if you know about it, it can be if it’s simply a Kirby feature. Other companies like GitLab have received negative feedback on that stuff before.

Maybe it’s less of a deal if it’s using the GitHub API, because the API is so widely used for so many things that the data can’t be used to track Kirby users.

@lukasbestle That’s definitely a valid point.

@lukasbestle @bastianallgeier I think it’s a great idea but I also think it should not be enabled by default. From a freelancer’s point of view - my goal is to build websites that are 100% manageable by my clients after my work is finished. I typically push Kirby updates to previous clients when there are big upgrades, or if an update is crucial to the way the panel is configured. But, I don’t want them to see an update notice and feel unable to act upon it, or expect me to.

1 Like

Yes, that’s another argument. So there should be a toggle in the config – and its default value should be false.

1 Like

I also agree, another very valid argument. Shouldn’t be a default setting.

Also we can already subscribe to the Kirby releases feed in our favorite RSS app. But having alerts directly in the Panel would be nice and integrated.

I use this simple bash script in most of my repo’s:

#!/bin/bash

echo "---"
echo "Starting update"
echo "---"

git submodule foreach --recursive git checkout master
git submodule foreach --recursive git pull

echo "---"
echo "Update done"
echo "---"

echo "Checking for changed files"
echo "---"
git status

echo "---"
echo "Kirby is updated. You need to commit changes yourself."
echo "---"
1 Like