Feature preview

Feature Introduction

How to coordinate the use of compressed packages and spreadsheets for batch importing historical articles of thousands of articles to a new site

Migration of more than a thousand historical articles can be done through two channels: content with a lot of text and images should be imported in batches using ZIP compression packages, and structured metadata and plain text content should be imported through Excel spreadsheets; then, to prevent duplicate entries, check for existing documents through the document import interface by title. Deleted official documents should go into the recycling bin for easy rollback. It is recommended to execute in batches, and check after each batch before scaling up.

Batch import Content migration

Feature Introduction

More than a thousand historical articles need to be migrated to a new site, it is recommended to use two channels in coordination: for existing content with images and other file resources, use ZIP compressed package batch import; for entries with tidy fields and mainly pure text, use Excel spreadsheet batch import; before importing, use the document import interface to query whether the title already exists to prevent the same content from being duplicated in the database; the import process is executed in batches, deleted formal documents go to the recycle bin instead of being physically deleted, and errors can be rolled back.

What data are suitable for each of the two channels

Data type Suggestion channel Reason
Add text with multiple images and attachments ZIP compression package Files and documents go in together, avoiding the need for a second upload
A well-organized list of metadata articles Excel spreadsheet Align the title, category, tags, and publish time by column
A long text in plain text Excel spreadsheet Little formatting information, tables can carry it
Need to keep the original directory structure ZIP compression package Organize by category when packaging, import side by side

The judgment basis is whether there are files in the content. If there are files, go for the zip package, and if there are no files, go for the table. This division of labor can avoid converting a large number of images into external links and manually supplementing them.

Three things to organize before migration

The first is title normalization. The most common accident during migration is not the failure of import, but the same article being imported twice. First, merge the titles once, converging duplicate copies, old versions, and final versions into one.

The second is category mapping. The columns of the old system and the content model of the new site are not one-to-one corresponding, so write a clear mapping table first, list the content that does not fit into any category separately for manual decision-making, and do not let it accumulate in the default category.

The third is field alignment. The table channel requires the title, content, classification, tags, and publishing time columns to be stable; blank values, abnormal dates, and rich text residues in old data should be cleaned up first, otherwise it is difficult to judge whether it is an import problem or a source data problem during the spot check.

Check before transmission: Avoid duplicate entries.

The batch import interface (document import channel /api/import/archive) supports querying whether the document already exists by title. Its purpose is here: check once before each batch upload, skip or update existing entries, and do not rely on manual records such as 'This batch has not been transmitted'. Under the scale of thousands of articles, interruption and retransmission are almost inevitable, and the basic requirement for the migration script is to be repeatable without generating dirty data.

The recommended scale for batch cutting is several hundred articles per batch, cut by category or time period. Too small batches will extend the overall time, and too large batches will have a wide range of error positioning.

Inspection and rollback after import

After each batch import is completed, first conduct a spot check before scaling up to the next batch, the items for spot check include:

  • Quantity check: Do the planned number of items in this batch match the actual number of items stored?
  • Status check: The documents imported in bulk are stored in the expected status, those that need preview confirmation should be checked with draft status and preview parameters, and then converted to formal documents after confirmation.
  • Resource check: Can images and attachments be accessed normally, and are there any paths that are expired?
  • Structure check: Are categories, tags, and custom fields in the correct position?

When handling errors, deleting the formal document will move it to the recycle bin instead of physical deletion, and mistakenly deleted items can be restored directly. This layer of backup allows the strategy of 'leading in to take a look' to be controllable in terms of risk. However, it should be noted that the recycle bin does not undertake version management, and if content is changed incorrectly, it still needs to be pushed from the source data. Therefore, the version of the source file is retained until the migration acceptance is passed.

Common questions

Can I upload a thousand articles all at once in a package?Not recommended. When a batch is too large, it is difficult to locate failures, and it is hard to judge which entries have been stored once an error occurs in the middle; batching and checking in batches usually takes less time in total.

Should the old internal links left in the text be dealt with first?Answer: Yes. While migrating, it's convenient to do a round of link rewriting, directing the old site path to the new site address, which is more cost-effective than using a full-site replacement after going live, and can also avoid residual links pointing to invalid addresses.

Question: What should be done with old site articles that have comments and user data?Answer: These two types are usually not within the scope of the document import channel. It is recommended to keep the old site read-only, or to migrate the database separately, and not mix them into the content migration batch.

Related functions

Preview

Should the content be visible to logged-in users based on their level, and how should user groups and access permissions be configured?

The corporate website usually only needs to set channel quotes, internal manuals, white paper downloads, and other such materials as group visible. This article presents a two-level design based on the priority of content scope: first, which columns and documents belong to the restricted range, and then configure access permissions according to user groups, and explain the relationship with draft and pending publication status, as well as the practice of verifying each item with different group accounts after configuration.

Preview

Should the anchor text of the in-site keyword be automatically attached or handwritten, and will batch replacement change the wrong link?

Anchor text management and the site-wide batch replacement address two things: the former automatically establishes internal links for new content according to the keyword library, while the latter is a one-time rewrite of existing content, and both at the same time can easily overlap. The automatic link hanging needs to be limited to the location of action, and the batch replacement needs to be tested first according to the category and time range. This article explains how to organize the keyword library, which positions should not be automatically linked, and the inspection and rollback methods after replacement is completed.

Preview

The article was just posted and was taken whole by another site. How far can anti-crawling interference codes prevent?

The cost of preventing collection interference codes is not the cost of plagiarism itself. It makes the copied text carry harmless noise to the original site but useless to the搬运方, thereby increasing the workload of cleaning and reformatting; it has limited effect on manual rewriting, abstract搬运, and only grabbing the title and abstract. The order of handling after being moved should be to first fix the first evidence, then check the对方抓取方式, and finally go through complaints and site ownership proof, rather than rely solely on technical interception.