118

Updated Answer for Craft 3 I've updated and consolidated the technical parts of this for Craft 3 and placed them in a security FAQ for easier referencing: https://craftcms.com/guides/security-faq Original Answer for Craft 2) Let me get this out of the way, first... there is no perfect software. Bugs exist and some of those will be security related. ...


23

In Craft 2: You can download previous versions of Craft from https://download.craftcms.com. Previous versions and builds of Craft are available with the following URL format in both zip and tar.gz versions: http://download.craftcms.com/craft/{version}/{version}.{build}/Craft-{version}.{build}.zip (or .tar.gz) For example, if you wanted Craft 2.1 build ...


13

It is indeed possible. Craft has a handy general configuration option for this exact situation. return array( 'backupDbOnUpdate' => false ); Just add that to config/general.php and that should do the trick!


8

At this point, after much playing around it seems to be working (at least on to the next bit of debugging). To sum up, it was mostly changes to composer.json, followed by composer remove kr37/calendar37 composer require kr37/calendar37 src/Plugin.php became src/Calendar37.php Added "class": "kr37\\calendar37\\Calendar37" to the "extra" part of composer....


7

We at Familiar have decided to leave craft out of git because of this exact issue. It's extra hassle every time an update comes out. To better deal with it we've built a couple of grunt functions as part of our craft yeoman generator. You can see the whole generator on npm: https://www.npmjs.org/package/generator-familiar-craft. Or just an idea of how the ...


6

composer.json and composer.lock aren't technically the only files that change; for example some of the files in the vendor folder change each time you update. If you're using Project Config, occasionally the project.yaml file will change if a plugin update makes some data architecture changes or something. Some Info on Composer and Craft and Updating The ...


5

In my specific case - upgrading from 2.0.2551 to 2.1.2570 - the issue was caused by there being millions of rows in the craft_entryversions table. One of the migrations in the update needed to loop through every row in that table and do something to it and therefore it took ages. Simply emptying that table solved the upgrade process for me. Caveats ...


5

I believe you're looking for the 'allowAutoUpdates' config option combined with multi-environment configs.


5

This approach assumes that the individual websites won't diverge from the original blueprint by, for example, modifying sections and fields to suit their specific requirements. That seems pretty unlikely. I'd be inclined to stick with the idea of creating a "blueprint" site, to get new websites up-and-running quickly, but ditch the idea of updating ...


5

No software is perfect. Like any other well-managed software project, Craft CMS is regularly updated with new features, improvements and bug fixes. Occasionally, the changes will relate to a specific security issue that has been discovered in the software. By not updating, you are missing out on the new features, improvements and bug fixes that make Craft ...


4

Ok, after a lot of trial and error I've finally managed to get this site upgraded. Here's a rough outline of the process and what the problem turned out to be: First, I tried updating one minor version at a time. This led me to find that the problem seemed to be with updating from the last build of 2.4 to the first build of 2.5 The error message on update ...


4

If you're setting an dynamic upload folder location for an Assets field inside of a Matrix field, you need to preface things like {slug} with {owner.slug}. See the note about dynamic subfolders on an Assets field inside of Matrix here: https://craftcms.com/docs/assets-fields#dynamic-subfolder-paths


4

Yes you can use the backupDbOnUpdate config setting: https://craftcms.com/docs/config-settings#backupDbOnUpdate


4

If you've seeing any install screen instead of an update screen, that means that Craft can connect to the database server specified in craft/config/db.php file, but it either can't find the database you've specified or it can't find the craft_info table. A common cause of this is the tablePrefix database config setting changed, for example.


3

Just make a backup of files and database first then click update (or upload a new /craft/app folder if you've got automatic updates turned off) - there are no breaking changes in Craft 2.6


3

I'd want the client knowingly and enthusiastically on board with a sensible plan that'd support business goals and the nature of evolving software. Either a) do with fewer plugins/integrations, b) invest in privately upgrading the plugins, c) open source the work if possible and ask for improvements with fingers crossed, or d) rethink the site so it's less ...


3

I’ve written a plugin that allows to announce scheduled maintenance in the CP and on the front-end by making use of the template variables it provides. https://github.com/carlcs/craft-maintenance Here’s some example code for how you can announce the maintenance {# Announce maintenance 1 hour in advance #} {% set announcement = craft.maintenance....


3

I think you're asking the IT equivalent of "If I go outside when it's storming, how can I not be hit by lightning?" There's always going to be that chance. When you run a public server, that's pretty similar. I'm not a high availability expert but as someone's who ran servers on behalf for clients, what you're really asking is 2 questions: How ...


3

As Lindsey D pointed out in the comment, the answer was to restore the database backup from the automatic backup located in /craft/storage/backups that is generated when the update was initiated. When this backup is put into place it will re-run the database migration when you visit the Admin area. So my full solution was 2 steps: Replace /craft/app with ...


3

That should do it! Auto-updating to 2.5 is causing a few people headaches, mainly because people are bumping up against their php.ini setting limitations. It's a pretty significant update, requiring pretty significant server resources to handle the transition. Once you've successfully rolled back, I'd recommend performing a manual update. This takes a lot ...


3

I've run into this issue myself with Craft version: 2.6.2962. The line in question is expecting a column from the database called "releaseDate". In my case, that column no longer exists. It might have gotten dropped or lost with one of the updates, I am not sure. A short-term solution would be to edit that line of code and pass in some different value. In ...


3

As a silly mistake, I had set the allowUpdates config setting to false...hope this helps anyone making the same silly mistake.


2

Not an answer, but one thing that might help you diagnose the problem, is to output all the return errors (without having to define it on each field as the example templates do). {% macro errorList(errors) %} {% if errors %} <ul class="errors"> {% for error in errors %} <li>{{ error }}</li> ...


2

If the page is rendered from a template that extends _layouts/elementindex, then the Element Index class instance is available at Craft.elementIndex. So all you’d need to do is include this in the settings object when creating your Modal instance: onHide: function() { Craft.elementIndex.updateElements(); }


2

How big is your database? It could be that Craft is failing to backup your database as part of the update process because it is running out of memory. Try setting the backupDbOnUpdate config setting to false and running the update again.


2

Craft's version numbers follow this pattern: major.minor.build So your update was a minor update and you could have blocked it with the settings build-only or false.


2

You can order entries by dateUpdated in descending order and then get the first entry. You would use that entries dateUpdated field to show when the site was last updated. {% set entry = craft.entries.order( 'dateUpdated desc' ).first() %} {{ entry.dateUpdated }}


2

It looks like the database schema (at Craft version 2.6.2773) is ahead of the craft/app files on your file system (at Craft version 2.5.2763). Since (I assume) you're not seeing any update info being logged in production around 2016-03-09 22:07:49 (from the dateUpdated column in the craft_info table), my guess is that someone updated the site/database ...


2

This has been fixed in Craft 2.6.2804.


2

Matt's answer covers some good ground, especially this line: "Odds are they chose Craft and their custom plugins for a reason and those reasons are still vitally relevant, as is the ability to stay nimble in the future." Wanted to expand on some points... I've walked into these kind of building-on-fire situations before and it's important to figure out the ...


Only top voted, non community-wiki answers of a minimum length are eligible