Skip to content

D7 to BackdropCMS migration on Pantheon: WebUI+SFTP option

This blog post is based on instructions from various sources and shows step by step how we are moving D7 to Backdrop CMS within Pantheon hosting using WebUI+SFTP option.  There are many other ways to do that, but this one works best for our team. 

Prepare existing D7 site  

  • Update modules to latest version (e.g. views, rabbit hole, etc) (estimated time 5 min)
  • Disable modules that are not used/upgradable, etc.
  • Install https://www.drupal.org/project/backdrop_upgrade_status , click on “configure” to get to url /admin/reports/updates/backdrop-upgrade  and run report manually

    backdrop modules status

    (estimated time 5 min)
  • Delete unused content, e.g.
    • Unpublished
    • Newsletter

Set up new Backdrop site (estimated time 30 min)

Migrate your site (estimated time 30 min)

  • Export current D7 database and files via Pantheon dashboard

    export files
  • Import D7 db via UI on Pantheon into Backdrop site

    import files and db
  • Connect to Backdrop code via SFTP and update the following line in file  settings.php
// change update setting  
$update_free_access to TRUE

open sftp client

Known issues/errors

  • If you click on “visit development site” button you will see this following error

    error
  • On url  /core/update.php you might see the following error. 

     db error

    Here is how to repair this issue
    • Connect via terminal using command from “connection” button

      terminal connection to db
    • Follow instructions on screen
​​ALTER TABLE  url_alias  CHANGE `language` `langcode` VARCHAR(12) NOT NULL DEFAULT '';

Optional lines: 

COMMENT 'The language code this alias is for; if ’und’, the alias will be used for unknown languages. Each Backdrop path can have an alias for each supported language.'

ADD INDEX `alias_langcode_pid` (`alias`, `langcode`, `pid`), ADD INDEX `source_langcode_pid` (`source`, `langcode`, `pid`);  
  • Created second role “administrator” and because of that existing admin could not see users - need to add role Admin to get access to admin toolbar
Update #1001

Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-administer account settings' for key 'PRIMARY': INSERT INTO {role_permission} (`rid`, `permission`, `module`) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2), (:db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => administer account settings [:db_insert_placeholder_2] => user [:db_insert_placeholder_3] => 7 [:db_insert_placeholder_4] => administer account settings [:db_insert_placeholder_5] => user ) in user_update_1001() (line 238 of /code/core/modules/user/user.install).
  • Enable Project installer to add new modules