Dec 02 2017
Regular readers of my site no doubt noticed that my site was offline for a little while a few days ago (today, by the timestamp, because Bolt doesn't let me postdate articles, only postdate when they go live) because I was upgrading the software to the latest stable version. It went remarkably smoothly this time, modulo the fact that I had to manually erase the disk cache so the upgrade process could finish and not error out. Deleting the cache alone took nearly an hour, and in the process I discovered something I wish I'd known about when I first started using Bolt.
So, here's what I'm on about...
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?
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.
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.