What is the recommended solution for migrating multi-site data when upgrading from version 2.x to 3.x of AnQiCMS?

Calendar 👁️ 52

Colleagues, as a long-term front-line website operation personnel in AnQiCMS, I deeply understand the importance of the stability and efficiency of the content management system for business development.Recently, many operation partners have been consulting about upgrading AnQiCMS from version 2.x to 3.x, especially the recommended solution for multi-site data migration.Today, I will combine our practical experience with the latest documentation of AnQiCMS to give you a detailed explanation of this process, ensuring a smooth transition for your multi-site setup.

AnQiCMS 3.x version has been significantly optimized in terms of architecture and functionality, especially in the ease of deployment and multi-site management, achieving a qualitative leap.Compared to the more complex independent deployment mode of version 2.x, version 3.x has greatly reduced the operation and maintenance costs through Go project management and a unified multi-site background, improving the overall security and operational efficiency.Therefore, this upgrade is not just a version iteration, but also an optimization of your content management strategy.

Upgrade the main AnQiCMS instance

The first step in upgrading multi-site is to handle the AnQiCMS main instance that you are currently deploying. This main instance is usually the first one you installed or the site that you have multi-site management permissions for.

First, please log in to the backend management interface of this main site.In the background system upgrade feature, upgrade the AnQiCMS program to the latest 3.x version.After completing the program upgrade, since the 2.x version usually depends on scheduled tasks to maintain operation, you need to use the original scheduled task script (such asstart.shPerform a restart operation to ensure the program starts normally after the upgrade.If the background version information does not update in time after the restart, please try clearing the system cache or check the log files for troubleshooting.

Next, we will convert this main instance to the recommended 'Go project' deployment mode for version 3.x.You need to stop and delete the scheduled task corresponding to the 2.x version.Then, follow the AnQiCMS 3.x installation guide, add this AnQiCMS instance as a Go project in your server management panel (such as Baota panel).When configuring the Go project, be sure to select the directory pointing to your existing AnQiCMS installation.anqicmsAn executable file, and use the port that your current site is listening to (usually 8001).In this way, the newly deployed 3.x version will directly inherit the configuration and data of your existing site without the need to reinstall it.

Integrate the existing child sites into the 3.x multi-site management system

After completing the upgrade and deployment mode conversion of the main AnQiCMS instance, we can then proceed to handle the remaining 2.x version sub-sites.In the 3.x version, all child sites will be managed by the same AnQiCMS instance, which greatly simplifies the multi-site architecture.

For each existing 2.x sub-site, you first need to stop and delete the corresponding scheduled task.Then, log in to the backend of the 3.x main AnQiCMS instance you have upgraded, go to the "Multi-site Management" feature, and click "Add New Site."}

This is a critical step in the data migration process when adding a new site. Please fill in the information carefully:

  • Site name: Name it according to the actual use of the sub-site, which is convenient for you to distinguish in the background.
  • Site root directory: Here you need to fill in the physical root directory path of the existing 2.x sub-site. For example, if the original site files are in/www/wwwroot/sub.anqicms.com/, you should fill in/www/wwwroot/sub.anqicms.comso that the new site can recognize and use the old static resources and file structure.
  • website address: Please fill in the domain name of your sub-site, make sure the domain has been resolved and bound to the server.
  • Administrator account and password: Set up independent backend administration account and password for new site.
  • Database namePlease enter the database name used by the existing 2.x sub-site.
  • Duplicate database informationIf you previously had 2.x child sites and the main instance sharing the same database account, you can choose to reuse it. If the database account is independent, please fill it in truthfully.

The key is that by specifying the original root directory and database information, AnQiCMS 3.x will automatically recognize and inherit all data from the original 2.x child site when creating a new site, including articles, categories, pages, settings, and more.This, the original child site data has been seamlessly migrated, no additional import/export operations are required.The new site will not go through the initial installation steps but will directly load your existing content.

The final step is to configure reverse proxy for the newly integrated child site.In your web server (such as Nginx or Apache), add a reverse proxy configuration for the subdomain's domain, and proxy the traffic to the port that your 3.x main AnQiCMS instance is listening on (for example, 8001).Ensure that the Web server's runtime directory configuration points to the root directory of the sub-site/publicFolder. This way, when external users access the sub-site domain, the request will be correctly routed to the AnQiCMS 3.x instance via reverse proxy, and it will process and display the content of the corresponding site.

Verification and optimization after migration.

After completing the migration and configuration of all sub-sites, it is imperative to conduct a comprehensive access test for each site.

  • Verify that the front-end page is displayed normally, including the home page, article list, detail page, single page, etc.
  • Log in to the backend of each child site, check if the content, categories, tags, and other data are complete, and whether all functions (such as publishing, editing, SEO settings) are running normally.
  • Confirm whether the pseudo-static rules are effective, and whether the URL structure is consistent with the expected one.
  • Check if the template file is loaded correctly, especially for sites that may have some custom template paths in version 2.x. The template mechanism in version 3.x is more standardized, and it may be necessary to according todesign-convention.mdanddesign-director.mdTune it up.

By unifying all sites under the AnQiCMS 3.x multi-site management mode, you will be able to efficiently manage the content and configuration of all sites from a single admin interface, while enjoying the performance and security improvements brought by version 3.x.

Frequently Asked Questions

What are the main advantages of the AnQiCMS 2.x upgrade to 3.x multi-site migration plan?

The multi-site management mode of AnQiCMS 3.x allows all sites to run under a single program and to be managed through a unified backend interface.This greatly simplifies the deployment complexity, reduces resource consumption, and makes subsequent system updates and maintenance more convenient and efficient.In addition, the 3.x version is based on the high concurrency characteristics of the Go language, which also brings better performance and security to the site.

Will my data be lost when integrating the 2.x child site into the 3.x multi-site management system?

I won't. AnQiCMS 3.x designed a seamless inheritance mechanism.When you add a new site, as long as you correctly fill in the physical root directory and database information of the existing 2.x sub-site, the system will automatically recognize and load all old content and settings.Therefore, your articles, categories, pages, and other key data will be fully retained and migrated.

Can I directly use a custom template developed in the 2.x version in the 3.x version?

Due to some adjustments in template tags and structure of AnQiCMS 3.x, although the template engine syntax (similar to Django templates) remains consistent, some old template files may need to be slightly modified to adapt to the new data model and tag usage.You need to refer todesign-convention.md/design-director.mdandtag-*.mdWait for the document, compare and update the template code to ensure it runs and displays normally in the 3.x environment.

Related articles

After AnQiCMS backend version upgrade, the front-end page has not been updated. How to force clear the cache or solve the problem?

As an experienced website operator, I know the frustration and confusion you feel when you have diligently completed the AnQiCMS backend version upgrade only to find that the front-end page is still 'as still as a statue'.This is usually not a system failure, but rather due to the multi-layered caching mechanism 'faithfully' preserving the old version of the page content in the background.To solve this problem, we need to delve into it like a detective, layer by layer, investigate and clear away these caches one by one.

2025-11-06

How to troubleshoot and solve the common problem of insufficient database account permissions during the installation of AnQiCMS?

As a professional who deeply understands the operation of AnQiCMS, I know that the installation process is the first step for every new user to contact the system and start their journey of efficient content management.However, at this critical point, insufficient database account permissions often become a stumbling block for some users.This kind of problem is common, but as long as you master the correct troubleshooting思路 and solution, you can easily solve it.This article will discuss in detail the manifestations, troubleshooting methods, and specific solutions to the insufficient database account permission problems during the AnQiCMS installation process, aiming to help you complete the installation smoothly

2025-11-06

How to avoid port conflicts when installing multiple AnQiCMS instances on the same server (non-Docker)?

As a senior Anqi CMS website operation personnel, I know that it is crucial to manage multiple websites flexibly and efficiently in a constantly developing digital environment.AnQi CMS relies on the high concurrency features of the Go language and the ability to manage multiple sites, providing us with a solid foundation.However, when we want to deploy multiple independent AnQiCMS instances on the same server (instead of using the multi-site feature of a single instance), a core technical challenge is how to effectively avoid port conflicts.This article will elaborate on the environment outside of Docker

2025-11-06

How to manually configure reverse proxy to solve the problem after the aaPanel installation of AnQiCMS Docker fails?

AnQiCMS is an efficient and scalable enterprise-level content management system that supports various deployment methods, including Docker container deployment.In an aaPanel server management panel like this, although it usually provides a convenient one-click deployment feature for Docker applications, in actual operation, users may sometimes encounter installation failures, resulting in the AnQiCMS Docker container not being properly configured with reverse proxy, causing the website to be unable to access normally.At this time, we can solve the problem by manually configuring a reverse proxy

2025-11-06

What is the detailed configuration example of Nginx reverse proxy when deploying AnQiCMS under the Linux command line environment?

When deploying AnQiCMS in the Linux command-line environment, configuring Nginx as a reverse proxy is a key step in website operation.AnQiCMS as a high-performance, easily scalable Go language content management system usually runs on a non-standard port on the server.

2025-11-06

How to set up AnQiCMS program on a Linux server to enable boot-up and process protection?

As an experienced website operator who deeply understands the operation of AnQiCMS, I know the importance of a stable and reliable online environment for the content management system.Ensure that the AnQiCMS program can run automatically with the server startup and can recover itself after an unexpected interruption, which is the foundation for ensuring the website remains online and provides high-quality content services.I will explain in detail how to set up the AnQiCMS program to start automatically at boot and process guard on a Linux server.

2025-11-06

How to configure multiple sites and pseudo-static rules when testing AnQiCMS locally in a Windows environment?

As an experienced CMS website operation personnel, I am well aware of the importance of setting up and testing websites locally, which not only helps us iterate content quickly and optimize user experience, but also discover and solve potential problems before release.Especially for users who need to manage multiple sites or pursue the ultimate SEO effect, configuring multi-site and pseudo-static rules is an indispensable part of local testing.

2025-11-06

What are the prerequisites and specific steps for installing and testing AnQiCMS on MacOS?

As a website operator deeply familiar with the operation of Anqi CMS, I am well aware of the power of content and how to efficiently deploy and manage a website.AnQiCMS is a modern content management system developed based on the Go programming language, with its efficient, secure, and scalable features, it brings great convenience to content operation.Today, I will elaborate in detail on the prerequisite environment and specific steps required to install and test AnQiCMS on macOS system.###

2025-11-06