Migrating content from TerminalFour (T4) version 7 to version 8

We use TerminalFour Site Manager (T4) as our content management system to manage content on the main University website. We are currently migrating content for external facing audiences from version 7 (v7) to the newer version 8 of the software (v8).

Unfortunately there is no easy way to automatically migrate content from one system to another, particularly as v8 has a different design for the pages. However, the following post describes how we have made some aspects of migration easier, which we hope others might find useful.

The migration task

Currently, v7 published out pages that contains all the information about undergraduate and postgraduate courses. We needed to migrate these pages into v8 so that they can sit alongside other information for prospective students.

We need to migrate the sections for the 2016 and 2017 postgraduate taught and 2017 undergraduate courses – a combined total of 341 sections. Each section was made up of around 15 individual content items giving a total of around 5,100 content items that would have to be manually copied and pasted from v7 into v8. Assuming 30 minutes to manually migrate each course over, this would take around 170 hours, or one person working full time for 5 weeks!

We decided that an alternative approach would be needed!

Simplify

The course information for 2016 and 2017 was largely static and was only maintained by the digital communications team. With the 2017 recruitment cycle nearly over, the chances of these pages needing further updates was unlikely. Therefore, instead of creating like for like content items in v8 we decided to migrate the entire course page over as static HTML. The process was as follows:

Diagram showing T4 migration process
Diagram showing T4 migration process
  1. Download a copy of the published files from the server to your desktop.
  2. Run a PHP script (GitHub) to extract the main content from each course page file. The script then creates two SQL queries:
    1. To insert the course name and extracted content (HTML) from each file into a new table within the v8 database.
    2. To update the output URIs for each of the sections that are created during the import (steps 3 and 4).
  3. Use the first SQL query to import the course name and content into a new table within the v8 database.
  4. Use the external content syncer service within v8 to import the course name and content from the table into a content type. In our case, we created a content type that had two fields: name and code. The external content syncer automatically creates a section for each course using the course name to set the section name.
  5. Use the second SQL query to update the output URIs, within the section_info table, for the newly added sections
  6. Rebuild the cache within v8 so the output URI appears in the T4 user interface.

This script allowed us to migrate the content from the majority of our course pages in just a couple of minutes, a fraction of the time it would have taken for us to copy and paste it all! The only pages that weren’t migrated this way were any sub-pages that sat underneath a course page. These pages had to be migrated manually, using copy and paste, but there was only a handful so it didn’t take long.

Once all of the pages had been successfully migrated into v8 we had to do a little more manual work to the content to make sure it was all working correctly in v8. These manual tasks involved updating links, migrating media items and checking the pages for accuracy, making sure nothing was lost or broken during the migration. These tasks would still have been required if the content was migrated manually so it didn’t add any extra time to the process.

We found that these manual edits took an average of 10 minutes per course, giving a time saving of about a third compared to the alternative approach.

Conclusion

It took us about a day to create, test and refine the PHP script and import process. It may seem to be a little bit convoluted, but we found it to be remarkably effective and certainly saved us a lot of time and effort. We hope you also find this approach helpful when migrating your own content!

The PHP script can be found on GitHub.

Leave a Reply

Your email address will not be published. Required fields are marked *