Skip to content
Matijs van Zuijlen edited this page Jun 30, 2023 · 12 revisions

Policy

Policy for 9.x and up

Starting with the 9.x series, the upgrade policy is as follows

  • It should always be possible to upgrade to the next minor version in one step. So, it should be possible to upgrade from any version 9.1.x to version 9.2, but not straight to (future) version 10.
  • Minor versions may include Rails upgrades and removal of deprecated features.
  • Older database migrations may be removed when a new major version comes out

Policy up to and including 9.0

  • It should always be possible to upgrade to the next major version in one step. So, it should be possible to upgrade from any version 6 to version 7, but not straight to version 8.

    This limitations was chosen to avoid having to keep around and maintain an ever increasing baggage of migrations.

It is highly recommended you upgrade regularly, since the longer you wait, the more steps the upgrade will take. Also, upgrading ensures security issues will be fixed.

Version-specific instructions

Upgrading to Publify 10.0

Publify 10.0 uses Rails 6.1 and requires at least Ruby version 2.7. To upgrade, make sure you've done the following:

  • Upgraded Publify to at least version 9.2
  • Upgraded Ruby to at least version 2.7
  • Migrated any existing posts that use the Textile text filter by running bundle exec rake publify:textile_to_markdown

Once you've dont that, follow the instructions in the section General Instructions below.

Upgrading to Publify 9.2

Publify 9.2 uses Rails 5.2 and requires at least Ruby version 2.4. To upgrade, make sure you've upgraded to at least version 9.1, are using at least Ruby version 2.4, and then follow the generic instructions below.

Additionally, you may need to make some adjustments: If you have any mail configuration in mail.yml, you will need to move those settings to config/environments/production.rb. If you have configured your timezone using timezone.yml, you will need to move that configuration to config/application.rb.

Upgrading to Publify 9.1

Publify 9.1 uses Rails 5.1 and requires at least Ruby version 2.2. To upgrade, make sure you've upgraded to at least version 9.0, are using at least Ruby version 2.2, and then follow the generic instructions below.

Upgrading to Publify 9.0

Please note that Publify 9.0 uses Rails 5.0 and drops support for Ruby 2.1. Also, it is recommended that you make sure you're up-to-date with the latest release in the 8.x series: 8.3.3.

Publify 9.0 uses the default Rails system for setting secret values. This means that you'll have to set the SECRET_KEY_BASE environment value to some secret value. You can do this by configuring your web server to set it, by using a tool like dotenv, or, on Heroku, by adding it to the set of values using the web interface.

For the smoothest transition, you can look in your existing config/secret.token for the exisiting secret and re-use that. This will keep sessions and Devise' password reset tokens working.

Please also take a look at the release notes for versions 9.0.0 and 9.0.1.

Upgrading to the latest version of Publify 8

If you're already using a version of Publify in the 8.x series, you can upgrade to its latest version using the general upgrade instructions below.

Please also read the relevant release announcements listed in the next section.

Upgrading from Publify 7 to Publify 8

From Publify 7 (either 7.0.0 or 7.1.0), you should be able to upgrade to any version in the 8.x series.

Before you begin, make sure you read the announcements for release 8.0, release 8.0.1, release 8.0.2, release 8.1.0, release 8.1.1, release 8.2.0, and release 8.3.0.

Then, see below for general upgrade instructions.

Upgrading from Typo 6 to Publify 7.

From Typo 6, you first have to migrate to Publify 7.

Make sure you first read the announcement of the change from Typo to Publify.

Then, see below for general instructions.

Upgrading from earlier versions of Typo

You must first upgrade to Typo 6.

General Instructions

In these instructions, I'm going to assume you're running your blog on a production environment. If not, replace production with your chosen environment.

Preparation

  • First, stop your blog installation. We don't want any changes to the database while upgrading.
  • Next, create a backup of your database so you can go back if something goes wrong.

Upgrading the Files

First, unpack the tarball to a new directory. I'm assuming your upgrading to release 8.0.1. If not, replace the release file name with the actual file name.

$ tar xvzf publify-8.0.1.tar.gz

Next, rename your whole blog directory to some safe place and replace it with the new one.

$ mv blog_path old_blog
$ mv publify-8.0.1 blog_path

Move your old files, theme, database.yml and any file you want to keep to your new install.

$ mv old_blog/themes/yourtheme blog_path/themes
$ mv old_blog/public/files/ blog_path/public
$ mv old_blog/config/database.yml blog_path/config
$ ...

Check that your Web server has the right to write your blog install, then restart your blog instance.

Upgrading the Database

Login in to your blog admin using your favourite web browser. You'll access to the database migration page. Just click on the "migrate" button.

If something goes wrong, go back to your terminal, and run

$ cd blog_path
$ RAILS_ENV=production rake db:migrate