How to import articles from the old station table once, if the fields do not match

📅 2026-11-01 👁️ 0

When exporting tables from the old station to batch import into the new system, it is the norm rather than an exception for fields not to match. The processing method has a fixed sequence: first decide which channel to use, then fix the necessary mapping columns, then define a default value strategy for the custom fields that do not match, and finally use the ability to search by title to avoid duplicate imports. Skipping the first step and directly modifying the table will usually require two rounds of changes.

Choose the channel first and then talk about mapping

Batch import supports two channels: ZIP compressed package and Excel table. Both have different functions and are not an either/or relationship.

Scene Suggestion channel Reason
Articles with attachments and illustrations need to be migrated together. ZIP compression package Attachments and the main text can be matched in the same batch.
Plain text articles exist as table columns. Excel spreadsheet The mapping from columns to fields is natural, convenient for batch verification.
It is necessary to connect with external systems and programmatic import. Import Interface First, check if it already exists before deciding whether to write.
The field structure of the old station is completely unclear. Lead a small batch first. Use a small number of samples to expose mapping issues.

Select the channel after mapping because the two channels can carry different information: the archive can carry the correspondence between attachments and files, while the table can only carry the content in the columns. If you find that the attachments are missing after changing the table, you have to start over again.

The three columns that must be mapped

No matter how chaotic the old site structure is, first fix these three columns: title, alias, and category.

The title determines the identity of the article, and also determines whether the subsequent query by title can find the existence; the alias determines the online address, and the wrong mapping of the alias will cause the address to change after import, which will affect the historical links and inclusion; the category determines the page attribution and the display of the list page, and when the category does not match, the article is there but cannot be found.

The three columns can be left blank first, but do not compromise on these three columns. When the column name of the old station is inconsistent with the new station category name, a name correspondence table should be made first, rather than letting the import guess.

How to deal with the mismatch of custom fields

The custom content model supports flexible content structures, fields can be defined according to the site, so there are two ways to handle fields that 'exist in the old site but not in the new site': one is to add a custom field in the new site to accommodate it, which is suitable for the field to still participate in display or filtering later; the other is to merge the content into the main text, which is suitable for just supplementary information.

The criteria are whether it needs to be read separately. If it needs to be filtered by the list or participate in template tag output, it goes through the field; if it's just for display, it goes into the main text.

The strategy for matching fields that do not match should be specified: leave blank, provide a fixed value, or extract from the text. This should be written in advance in the import instructions, otherwise, the result of bulk import will have half empty values and half chaotic values. The deleted content can still be recovered from the recycle bin, but cleaning up the chaotic batch data is more time-consuming than recovery, so it is better to run through a test batch first.

Check for duplicate titles after import

The most common problem with batch importing is duplication. The document content import interface /api/import/archive supports querying whether it already exists by title, and the correct usage of this feature is to check it once before writing: update or skip if matched, and only write if not matched. Placing duplicate checking after importing turns it into creating duplicates first and then cleaning them up.

Check after import: sampling in three steps: randomly select several articles to verify the consistency of the title and alias with the table; verify the correctness of the category attribution; check if the attachments of articles with attachments are in place. The sample size does not need to be large, but it should cover the categories that do not match the fields, as problems are always concentrated at the boundaries.

Common questions

Which columns are supported by Excel table import?

It supports mapping columns to basic fields such as title, alias, category, and custom fields. The key is to define the correspondence between column names and new system fields in advance, and the columns that are not matched will be ignored.

What method should be used for articles with images?

Use a ZIP archive. The attachments and the main text are in the same batch, maintaining the corresponding relationship; the table channel can only express text columns.

How to roll back if the import is incorrect?

Single-item deletion can be restored to the recycle bin; for batch errors, it is recommended to check for duplicates before re-importing in batches, and decide whether to skip or write by querying the title to see if it already exists, which is more time-saving than cleaning up one article at a time.

What should I do if the old site field is more than the new site?

分流:To participate in filtering and display, supplement with custom fields; for only explanatory purposes, merge into the main text; discard those with no practical use directly.

Related articles

For articles sent at scheduled times, should the page cache be refreshed again?

Set the article for timed publishing to be released on time, and check whether the main content page, list and home page cache, and sitemap are in sync. Static generation and state transition are two steps, the cache of the list page is often behind the detail page, and the new address also needs to enter the sitemap and cooperate with link push, so that the timed publishing can truly be seen.

2026-11-01

After the translation of the multilingual site is completed, should the page address of each language be generated separately?

After the full-page translation of a multilingual site is completed, each language should have a stable and accessible independent page address, and a sitemap should be generated separately by language for easy verification. Language tags solve the problem of displaying the correct version of search and AI retrieval, but do not improve ranking. This article gives the verification sequence and common mistakes after going online.

2026-11-01

How to see the default switch of a new site placed in a back-end system?

When multiple sites share the same backend, the default switch of a new site only checks three things: which batch of sites the default value of the site status affects, whether the access entry and content structure are properly matched, and the difference between closing and deleting. This article provides the check sequence for a new site and explains the fallback role of the recycle bin and backup in the multi-site scenario.

2026-11-01

How to queue for site upgrades when the security minor version is released on the same day and the major version is scheduled for December?

The short-cycle security minor version and the end-of-year major version should be queued in two channels: the security version enters the maintenance window on the same day, and the major version is first verified in the test environment for templates and data, and then灰度切量并可回退。This article provides the queuing rules, steps within the window, and observation indicators for the gray period for the two types of versions.

2026-11-01

Can deleted articles be retrieved, and how are drafts, pending publication, and recycling stations divided?

Deleted articles can usually be retrieved: In the AnQiCMS backend, deleting formal documents is not a physical deletion, but moving them to the recycle bin, from which they can be restored. Each of the four document statuses has its own boundaries - formal documents are visible to the public, drafts are only in the background and preview links contain the preview tag, pending publication waits for the set time to take effect, and the recycle bin accommodates deleted content. This article explains the appropriate operations for each and the safe sequence for bulk cleaning.

2026-11-01

How to plan the column structure and classification for a single backend to manage multiple sites without conflict

When managing multiple sites with a single backend, the place where column structure and classification are most likely to interfere with each other is when reusable definitions and isolated data are mixed together. This article explains by separating the shared layer and the isolation layer: the definition of the content model can be reused across multiple sites, the classification tree, column aliases, and visibility range should be planned independently for each site, batch operations at the whole-site level are disabled by default and explicitly enabled per site, and a landing sequence and a corresponding table are provided.

2026-11-01

When starting a site with a container image, should the default port and background address be changed together?

When starting a station using a container image, whether to change the default port and backend address at the same time depends on where the traffic comes from: After the site is behind the reverse proxy, the container listening on port 8001 only needs to match in the mapping, the default port does not need to be changed; what needs to be received is the exposed surface of the backend address. Before going online, enable the built-in protections such as JWT authentication, sensitive word filtering, captcha, and rate limiting first, and then verify it once from the external network.

2026-11-01

Several thousand articles need to be moved, should it be imported using a compressed package or a table?

When moving thousands of articles, the basis for choosing between compressed package import and table import is not the quantity but the material form: batch import using ZIP compression packages for text with attachments and rich text, and batch import using Excel tables for neatly organized fields. First align the content model and custom fields, and then use the import interface for title duplication check to control duplicates, and only the failed batches can be safely rerun.

2026-11-01