What method should be used for batch importing articles, and what scenarios do the interface and backend manage?

📅 October 26, 2026 👁️ 1

How to use the batch import function for articles depends on where the content comes from and who triggers it: a batch of manuscripts manually organized go through the background batch import, and archives automatically produced by the program go through the import interface. AnQiCMS keeps both paths, supporting two types of batch import forms in the background, such as ZIP compression packages and Excel spreadsheets, and providing document content import interfaces on the interface side./api/import/archiveYou can first check the title to see if it already exists before deciding whether to write. The cost of choosing incorrectly is usually duplicate documents and misplaced fields, not import failure.

The division of labor between the two chains

Background batch import is an operation where people are present: organize the catalog, package, import, and check the results. It is manageable to process several hundred articles at once, but it is not suitable for daily incremental updates. Interface import is an operation where the program is present: the caller is responsible for preparing the data and retrying, while the site is only responsible for receiving and checking for duplicates, suitable for content factory assembly lines, cross-system synchronization, and articles driven by scripts or AI tools.

The judgment criteria are very practical: whether the same batch of content needs to be manually confirmed each time. Items that require confirmation go through the background, and items that only follow the rules go through the interface.

Dimension Batch import in the background Interface import (/api/import/archive)
Triggerer Manual operation by site operation personnel Program or script call
Input form ZIP compressed package, Excel table Archived data submitted in the request body
Suitable frequency One-time migration, phased supplementing Daily increment, continuous synchronization
Duplicate removal method Manual verification list before import Check if it exists by title first
Failure handling Check background prompts and reorganize package Retry and record logs by the caller

Applicability of background batch import

Export data from the old system, the most common product is a content compression package and a table. This type of one-time migration is most convenient to use batch import in the background: first try 5 to 10 articles in a small category, confirm that the title, publication time, category attribution, and tags match, and then expand to the whole batch. One-time migration has a large scale, and it should be confirmed before import that backups are available, make a backup of the data (including static files), so that the entire site can be rolled back in case of problems.

There are only three situations suitable for going through the background: the source data is a manually organized document package; the category mapping has not been finalized and needs to be adjusted on the go; and immediate manual inspection of layout is required after import.

What scenarios are suitable for interface import

Programmatic content creation must go through the interface. Typical scenarios include scheduling the delivery of finalized content from external editing systems daily, or by automated writing processes to batch generate content. The key action of interface import is 'search first, then write': calling/api/import/archiveFirst, check if the document exists by title, skip or update if it exists, and write if it does not exist. Without this step, the same article may be pushed out as ten or so duplicate documents within a few days, and then cleaned up one by one with the recycle bin.

The caller needs to know about the capabilities of document list and details, classification and tags, the interface documentation should be read before integration; AnQiCMS's public API covers document list/details, classification and tags, image upload, comments and reviews, friend links, system settings, and other high-frequency capabilities, go through these interface documents first and then decide where to place the import interface in the process.

Check which fields before migration.

Most of the failures in import are not 'cannot be imported', but 'imported incorrectly'. Make a list of field verification before taking action:

  • Title: Whether the column name prefix of the old system is included, whether it is repeated.
  • How to map old categories to new categories, or go to the default category directly if not mapped?
  • Custom fields: Are the field names consistent in the content model? AnQiCMS supports custom content models and custom fields. If the names of the extended fields in the old system do not match, they will be empty after import, and this part needs to be synchronized in the template.
  • Text and images: Is the image accessible on the new site, and should external links be saved first?
  • Status: Whether the imported draft, to be published, or formal document should be scheduled for release.

How to inspect after migration?

The sampling ratio is more effective when viewed in full. Check a few articles per category, ensure that the title, content layout, images, tags, and abstracts are complete, and then confirm that the list page and detail page can be opened normally. Place the continuation of old links in this step: either use 301 redirect from the old address to the new address, or use the site-wide replacement tool to batch replace keywords or links, so that the completion of import does not equal the completion of going online.

Don't panic if you delete the wrong document: deleting formal documents is to move them to the recycle bin instead of physical deletion, and they can be restored from the recycle bin, which leaves room for cleaning after batch import.

Common questions

The old system can only export HTML files, which path to take?Create a ZIP compressed package for batch import via background; keep the directory structure of the package one level, avoiding overlapping of files with the same name.

Can interface import and background batch import be used together?Yes. The common practice is to use background batch import for historical content, and hand over the incremental updates to the interface on a daily basis.

What should you do if the category is incorrectly assigned after import?For small batches, make changes one by one in the background. For batch errors, first use the site-wide replacement to process links and keywords, then adjust batch by category, and make a backup before making changes.

How should you handle the same batch of content being imported twice?Retain one copy based on the title, delete the rest into the recycle bin, and clear it after confirming it is correct; next time, prevent duplicate entries by querying the title from the interface side.

Related articles

The test version announcement is only suitable for test environments, and how to set up a pre-release site.

Announcement of the test version written by oneself, 'Only suitable for test and development environments', means that a pre-release site with the same version, configuration, and data form as the official site is needed to carry out verification. The method is four steps: copy data副本 from the official library, replicate the environment according to the configuration of the official site, isolate the verification content with drafts and pending release status, and synchronize the conclusion to the official site after acceptance.

2026-10-26

Before going live, use the online experience site to inspect the functionality, which can help identify real problems in advance.

Before going live, use the online trial site to verify the function, which can help to discover three types of real problems in advance: the background action path is inconsistent with expectations, the function has an entry but lacks key configuration, and it is impossible to judge the scope of impact of batch operations. The trial site verifies the function and interaction, while deployment, data migration, and backup recovery require a separate test instance to be run independently, with two people responsible for a section of verification each.

2026-10-26

Who should do the full site replacement and 301 redirect first when multiple site groups are revised together

When multiple site groups are redesigned together, first determine the new site's pseudo-static rules and set up the 301 redirect table, and then perform the full site replacement. The two actions modify different objects: redirection manages URL ownership, and replacement manages keywords and link text in the main text. The wrong order will allow the same round of crawling to see both old and new addresses at the same time, causing collection to fluctuate back and forth, and batch verification by site is the key to closing the mouth.

2026-10-26

How to avoid simultaneous online launch of scheduled releases for multi-site groups

When multiple site groups share a set of scheduled release schedules, the impact of simultaneous online launch falls on the crawling and indexing queues: at the same time, a large number of page changes occur, the marginal benefits of crawling decrease, and the inclusion pace actually slows down. Peak-shaving is divided into three steps: group by site to open up time windows, give up the whole points, and reserve time slots for revision and backup; the order of priority is arranged according to the impact of inclusion, not according to the size of the site, and the status of pending release is used to carry the schedule instead of as a draft.

2026-10-26

Import in bulk using both zip packages and tables. When images and fields do not match, check which side first

When importing in bulk, check the table side first and then the image side: if fields do not match, it is mostly because the column names and custom fields are not aligned, and if images are missing, it is mostly because the file paths in the zip package do not match the names referenced in the table. AnQiCMS supports ZIP package and Excel imports, the import interface can be queried by title to check if it already exists, and it should be used to judge before repeating the execution

2026-10-26

How to arrange the order of sensitive word filtering and manual review before the collected content goes live

The order before the content goes live is: first draft, then sensitive word filtering and keyword replacement, followed by manual review, and finally the formal document is changed. The rule layer is responsible for determinable issues, the manual layer is responsible for facts and scope, and the recycling station catches accidental deletions. Reversing the order will allow low-quality content to enter the visible range of search with a complete index.

2026-10-26

What are the recovery methods available in the background if an article is deleted or modified

First, determine whether it was a deletion error or a modification error. In AnQiCMS, the deletion action is to move the formal document to the recycle bin, not a physical deletion, and it can be restored from the recycle bin; for modification errors, check if there are draft and historical versions of the pending release status. If there are no rollback versions available, there is only the last line of defense, which is the data backup, and the backup range should include static files, and it should be verified regularly whether it can really be restored.

2026-10-25

Scheduled releases are set for two o'clock in the morning, and who is in charge of the content launch process?

The scheduled release at 2 o'clock in the morning cannot rely on human guards. The time factor is only responsible for going online on time, not for the quality of the content; the real control is the status transition and content review before release: drafts are responsible for writing, to be released for review, sensitive word filtering and keyword replacement are supported at the system level, and then the authority decides who can put the manuscripts into the to be released queue.

2026-10-26