Import or export of large page branches in TYPO3

Import or export of large page branches in TYPO3

You know that: With the help of the typo3 / cms-impexp package, content can first be exported as XML or T3D and then imported again. However, sometimes this reaches its limits. And here we may have something for you.

It is in the nature of an Apache or Nginx server that each PHP process should only run for a short time. There is also the memory_limit, which often only allows a few hundred MB per process. The situation is different with processes that are initiated via the CLI. Unfortunately there is still no working import and export of typo3/cms-impexp.

A long time ago we built a TYPO3 package that can help you with TYPO3 migrations. In addition to many useful tools for migrations, in2code/migration also offers CLI functions to export large page trees with all data records and files as JSON and then import them again.

First, however, the package must be installed via Composer:

composer require --dev in2code/migration

Then you can use a configuration file in a separate extension to make all the necessary settings. Further details can be found in the migration or in the import / export documentation.

From now on, very large side trees or entire TYPO3 instances can also be merged.

Example export:

# Export page with pid123 and all its subpages into a json file ./vendor/bin/typo3cms migration:export 123 > /home/user/export.json

Und after that an example import:

# Import page branch with subpages and files into page with uid 123 ./vendor/bin/typo3cms migration:import /home/user/export.json 123

Tip: From a size of the JSON file of 6-10GB (for page trees with many thousand pages and a similar number of files such as PDF, video or image files), you can think about integrating files from the fileadmin directory (or other storages ) via configuration.

Alexander Kellner

Alex Kellner

Alex Kellner is not only known for his many TYPO3 extensions such as powermail, femanager or lux, but also for his community work. He is also happy to give administration or development training courses or workshops.

Alexander Kellner  |  Management & COO

TYPO3: Finding unused files in fileadmin

Do you want to delete unused or orphaned files in fileadmin or another storage location? Unfortunately, there's no direct core functionality for this. But a small command in your site package can...

Go to news

TYPO3: Editors with individual user_upload folders

Perhaps you're familiar with this client requirement? Editors should be able to add videos using the "Add media by URL" button. But the files shouldn't be located in fileadmin/user_upload/, but rather...

Go to news

TYPO3: Finding pages in mixed mode

In TYPO3, Mixed Mode refers to translated pages that contain content only partially related to the corresponding content in the main language. This is indicated in the backend by an error message. But...

Go to news

Extbase Extensions: Think extensibility with data, site and language

Today, I have a small request for the TYPO3 extension authors out there: Make sure your extensions are extensible. This will also promote the distribution of the corresponding plugins.

Go to news

SQL: Show all tables sorted by size in descending order

Lately I've been using the SQL command more often to find out which tables in the TYPO3 database are the largest. I've published the snippet once.

Go to news

TYPO3 12 with CKEditor 5: Styles in a single selection

If you set a link in the RTE in TYPO3, you may have to choose between different link classes, for example to create buttons in the frontend. What's new in TYPO3 12 is that you can select not just one...

Go to news