Getting stuck upgrading Bolt and what to do about it.

May 01, 2017

UPDATE - 20170512 - More SQL surgery.

So, as you've no doubt noticed I've been running the Bolt CMS to power my website for a while now.  I've also mentioned once or twice that I've found it to be something of a finicky beast and doing anything major to it can be something of an adventure.  I tried to upgrade my site last week (tonight, by the datestamp on this post) and had to restore from backup yet again because something went sideways.  That something was the upgrade process going wrong and throwing an exception because of something in the cache directory, where Bolt temporarily stores HTML files rendered from templates used to make pages that your web browser displays.

As it turned out, the upgrade process was choking on the old cache directories created and used by v2.x of the Bolt CMS.  Here is the upgrade process that I used:

  • BACK UP YOUR SITE.
  • Log into your web hosting provider's server via SSH.
  • Download the latest version of the flat file structure build of Bolt.
  • If you didn't back up your website, BACK UP YOUR WEB SITE.
  • cd ~/my.website.here
  • If you didn't back up your website and things go pear-shaped, it's your fault.  Don't say I didn't warn you.
  • Uncompress the new version of Bolt you just downloaded: tar xvfz ~/bolt-latest-flat-structure.tar.gz --strip-components=1
  • Try running the upgrade: php app/nut setup:sync
  • If it throws an exception on you, erase the entire on-disk cache.  Don't worry, it'll be rebuilt as people visit your site: rm -rf app/cache/*
  • Try running the upgrade again: php app/nut setup:sync
  • It should complete successfully.  If it doesn't you may need to do the following two things before re-running the upgrade command again:
    • mkdir -p app/cache/production/data/
    • chmod -R 0775 app/cache/
    • If you still have problems, jump into the Bolt CMS Slack chat and politely ask good questions: https://boltcms.slack.com/
  • If the command finishes normally, try opening the frontpage of your website.  It should be up and running.
  • If you can see the frontpage of your website, try logging in.  You should be able to.
  • Try making a test post with a new entry.  Be sure to test saving the post partway through.  You do save your work every few minutes, don't you?
  • Success.

Special thanks to Bob and thisiseduardo in the Bolt CMS Slack chat for their assistance and hand-holding while I stumbled around trying to make this hapen.

Upgrading Bolt CMS to v3.x.

Jan 02, 2017

Since PivotX went out of support I've been running the Bolt CMS for my website at Dreamhost (referral link).  A couple of weeks back you may have noticed some trouble my site was having, due to my running into significant difficulty encountered when upgrading from the v2.x release series to the v3.x release series.  Some stuff went sideways, and I had to restore from backup at least once before I managed to get the upgrade procedure straightened out with the help of some of the developers in the Bolt IRC channel on Freenode.  If it wasn't for help from rossriley it would have taken significantly longer to un-fuck my website.

Here's the procedure that I used to get my site upgraded to the latest release of Bolt.

Upgrading Ubuntu Server 14.04 to 16.04.

Oct 29, 2016

A couple of days ago I got it into my head to upgrade one of my Exocortex servers from Ubuntu Server 14.04 LTS to 16.04 LTS, the latest stable release. While Ubuntu long-term support releases are good for a couple of years (14.04 LTS would be supported until at least 2020) I had some concerns about the packages themselves being too stale to run the later releases of much of my software. To be more specific, I could continue to hope that the Ruby and Python interpreters I have installed could be upgraded as necessary but at some point the core system libraries would be too old and they'd no longer compile. Not good for long-term planning.

First off, whenver you're about to do a major upgrade of anything, read the release notes so you know what you're getting yourself into. You'll also usually find some notes about all the new goodies you'll be able to play with.

In the past I've had nothing but trouble using the documented Ubuntu release upgrade process, so much so that I've had clients sign "I told you so," documents when they pressured me to do so because the procedure could reliably be expected to leave the system completely trashed, and a full rebuild was the only recourse. This time I set up a testbed in Virtualbox which consisted of a fully patched Ubuntu Server 14.04.5 LTS install. I ran through the documented upgrade process, and much to my surprise it went smoothly, leaving me with a functional virtual machine at the end of a 45 minute procedure (most of which was automatic, I only had to answer a few questions along the way). The process consisted of logging in as the root user (sudo -s) and running the updater (do-release-upgrade).

So, if it's so easy, why am I writing a blog post about it? Why worry?

Why worry, indeed. Read on.