Migrate from TYPO3 to PagibleAI CMS

The TYPO3 importer moves a TYPO3 page tree into PagibleAI with its content, files, redirects and translations. It supports the stock content elements and those of the Bootstrap Package. TYPO3 9 or newer is required, because older versions don't store the URLs of the pages.

This guide covers the TYPO3-specific parts. Read Migrate to PagibleAI first for installing the importer, the options all importers share and the checklist after the import.

Connect the TYPO3 database

Add the TYPO3 database to the connections array in config/database.php. TYPO3 doesn't use table prefixes, so the connection needs no prefix setting:

'typo3' => [
    'driver' => 'mysql',
    'host' => env('T3_DB_HOST', '127.0.0.1'),
    'database' => env('T3_DB_DATABASE', 'typo3'),
    'username' => env('T3_DB_USERNAME', 'root'),
    'password' => env('T3_DB_PASSWORD', ''),
],

Run the import

Pass the domain of the site and, after a colon, the UID of its root page. Check what would be imported first:

php artisan cms:t3-import --domain=example.com:1 --dry-run

Then run the import with the theme of the new site and the location of the TYPO3 files:

php artisan cms:t3-import --domain=example.com:1 --theme=pagible --file-base=https://example.com/fileadmin

--domain is repeatable for installations with several page trees.

Without --path, the pages are imported as English pages by default. If the default language of the TYPO3 site is another one, pass it with --lang, e.g. --lang=de. Otherwise, the pages get the wrong language and English translations are skipped.

Read the site configurations

If PagibleAI can access the TYPO3 installation, pass its path with --path. The importer then reads the site configurations in config/sites/*/config.yaml (typo3conf/sites/ in older versions), which requires the Symfony YAML component:

composer require symfony/yaml
php artisan cms:t3-import --path=/var/www/typo3 --theme=pagible

Pages with a site configuration become root pages with the domain of their base, or of the baseVariants entry for the production context. The languages of the sites are used for the translations, and their default language becomes the language of the pages unless you pass --lang. Bases with environment variables like %env(BASE)% can't be resolved, so use --domain for these sites.

Files

--file-base sets where the TYPO3 files are read from. The default is the /fileadmin URL of the domain.

  • URL: The files are downloaded into the PagibleAI file storage, so the old server can be shut down after the move. Choose this if you replace the TYPO3 server.
  • Local path: The files aren't copied. PagibleAI references them at their path, so they must stay available there. The import is faster because nothing is downloaded, but only works if PagibleAI runs on the same server.

Image crop areas are applied to downloaded images, and alternative texts or captions become the file descriptions. Files marked as missing in TYPO3 are skipped.

Content

The importer keeps the page hierarchy, shared content references and the column order of the backend layouts stored in the database. Content of EXT:container and gridelements containers follows its container in the order of the container columns. Use --group to put the content of a TYPO3 column into another PagibleAI element group, e.g. --group=1:sidebar.

These content elements are converted:

TYPO3
PagibleAI
Header, text, text with image, text and media, image, HTML, shortcut
Matching elements
Bullet lists
Text, or HTML for definition lists
Tables, Bootstrap Package CSV tables
Tables, links in cells are kept
Uploads and file collections
File elements in the configured sort order
Linked images
HTML, because image elements can't contain links
Bootstrap Package accordions and tabs
Questions
Bootstrap Package carousels
Slideshows, or cards if the slides contain text
Bootstrap Package galleries and media
Slideshows, text with images and embedded videos
Bootstrap Package card groups and icon groups
Cards with icons and button links
Bootstrap Package timelines, list groups, quotes
Timelines, lists, quotes

Headers, subheaders and dates are imported like fluid_styled_content renders them. Links to content anchors like #c123 point to the imported elements, and legacy notations like 5 or file:12 are resolved. Links with other schemes than http, https, mailto and tel are dropped.

Skipped and reported: Plugins, forms, login forms and menus can't be imported, so only their header is kept. Unknown content types are imported with their heading, body text and files only. Content in columns that aren't part of the backend layout isn't shown by TYPO3 and is skipped as well.

Not imported:

  • dividers and the icons of Bootstrap Package icon sets
  • the sitemap priority and change frequency
  • the link targets of cards and the sources of quotes
  • the header position and the table footer setting
  • the layout and description settings of uploads
  • file collections that select files by category

Hidden and restricted pages

TYPO3 page restrictions can't be transferred, so the importer imports these pages as disabled pages and reports why:

  • hidden pages and pages restricted to frontend user groups
  • pages whose stop date has passed
  • pages with a start date in the future, which you have to enable at that date
  • subpages of hidden or restricted pages whose settings include the subpages

Pages hidden in the menu become hidden pages, which are reachable by their URL but not shown in the navigation. Review the disabled pages after the import and enable them or set their frontend access.

Redirects

When the whole page tree is imported, the enabled and active redirects of the TYPO3 redirects module (sys_redirect) become hidden pages below the root page. Regular expressions, redirects with query parameters, redirects of the home page, unresolvable targets and redirects whose URL is used by another page are skipped and reported. The status code of the redirects isn't imported. Redirects removed in TYPO3 since the last import are disabled.

Translations

Translated pages and their content become language variants of the imported pages, with the default language as source. The languages are read from the sys_language table or the site configurations. Add or override them with --language, which takes the TYPO3 language UID, the language code and an optional URL if the translations use a separate domain:

php artisan cms:t3-import --domain=example.com:1 --language=1:de --language=2:fr:https://example.fr/
  • Translation URLs are imported as they are, without a language prefix.
  • Links in translated content point to the translations of the linked pages, or to the fallback or default language if a page isn't translated. The l18n_cfg settings of the pages are respected.
  • Translations whose elements don't match the source elements are marked as "Needs update", so you can translate them again from the source.
  • Translations whose URL is already used, like a translated root page with the slug / on the same domain, are skipped with a warning. The same applies to languages without a code.

How language variants work in PagibleAI is described in Multilingual websites.

Options

Besides the common options like --domain, --lang, --editor and --since, the TYPO3 importer accepts:

Option
Default
Description
--domain
Auto-detected
Domain, optionally followed by the root page UID, e.g. example.com:1; repeatable
--theme
Theme of the imported pages
--file-base
/fileadmin URL of the domain
Base URL or local path of the TYPO3 files
--path
Path of the TYPO3 installation for the site configurations and local files
--group
main
Element group of a TYPO3 column, e.g. 1:sidebar; repeatable
--page
Import or update only this page UID; repeatable
--language
From sys_language
Language UID imported as translation, e.g. 1:de or 2:fr:https://example.fr/; repeatable

Run the import again

Run the same command again to update the pages while editors still work in TYPO3. With --since, pages also count as changed if their content, files or content source pages changed, became visible or expired since that date. To update single pages, pass their UIDs with --page:

php artisan cms:t3-import --domain=example.com:1 --page=106 --page=107

Imports with --page don't import redirects. Pages changed in PagibleAI since the last import aren't overwritten. See Migrate to PagibleAI for the details.

Troubleshooting

The pages have the wrong language

The import ran without --path and the default language of the TYPO3 site isn't English. Import again with --lang and the language code of the default language, e.g. --lang=de, or pass the TYPO3 installation with --path.

The content of a page is in the wrong order

Backend layouts defined in PageTSconfig (pagets__…) aren't read. The content of these pages is ordered main column first, then by column. Move the backend layout into a database record or reorder the elements in PagibleAI.

Content of a column is missing

Columns that aren't part of the backend layout aren't shown by TYPO3 and are skipped with a warning. Add the column to the backend layout or move the content to another column before you import again.

Restricted pages were imported as disabled pages

TYPO3 frontend user groups can't be transferred. Review the disabled pages and set their frontend access in PagibleAI.

A site wasn't imported with --path

Its base uses an environment variable like %env(BASE)%. Pass the domain and root page UID of the site with --domain.

The translated home page was skipped

It uses the same URL / on the same domain as the source page. Pass a separate domain for the language, e.g. --language=1:de:https://example.de/.