How to smoothly upgrade from version v2.x of AnQiCMS to version v3.x? In-depth analysis and practical guide

As an experienced website operation expert, I fully understand the importance of a stable and efficient CMS system to business.AnQiCMS (AnQiCMS) has become a powerful assistant for many small and medium-sized enterprises and content operation teams with its efficient Go language architecture and rich features.With AnQiCMS continuously iterating and upgrading, the v3.x version brings more powerful performance, simplified deployment, and a more unified management experience.For users still running v2.x versions, upgrading to v3.x is not only about enjoying new features, but also an important step to lay a solid foundation for the future development of the website.

However, every system upgrade may be accompanied by challenges, especially when the underlying architecture is optimized.The upgrade from AnQiCMS v2.x to v3.x is not just a simple version update, but also includes the innovation of deployment mode and multi-site management concepts.The v2.x version may be somewhat complex to install and deploy on the server, and lacks convenient features such as background restarts, which brings some inconvenience to daily operations.The v3.x version was born to address these pain points, it introduces a more modern, easier-to-manage Go project deployment mode, and thoroughly optimizes the multi-site management mechanism.Therefore, this guide aims to help you understand the advantages of v3.x and provide a smooth, safe upgrade path.

Embrace v3.x: Core advantages of the new version

AnQiCMS v3.x version has been significantly optimized in many aspects, aiming to provide superior performance and a more convenient operation experience.Firstly, it has comprehensively improved the underlying deployment method, recommending the use of modern Go project deployment, which makes the system startup, shutdown, and management more intuitive and stable, especially solving the problem of the lack of background restart function in the v2.x version.

Secondly, v3.x has achieved a major breakthrough in multi-site management.In the past, managing multiple AnQiCMS sites may have required deploying multiple independent programs, while v3.x supports managing multiple websites under a single AnQiCMS instance.This means less resource consumption, more centralized maintenance, and the convenience of cross-site data sharing and resource integration.Whether it is a company with multiple brand sub-sites or a team operating multiple content branches, they can benefit greatly from it.

In addition, v3.x has also been enhanced in terms of features, such as more comprehensive content model customization, refined SEO tools (Sitemap generation, keyword library, 301 redirection, etc.), more intelligent content collection and batch import, as well as anti-crawling, watermark management, and other copyright protection features.These will further improve the efficiency of content operation and the competitiveness of the website.

Preparation before the upgrade

Before you embark on the upgrade journey of AnQiCMS v3.x, meticulous preparation is the golden rule to ensure data security and a smooth upgrade.

first, Ensure a complete data backupThis includes your AnQiCMS database (MySQL database) and all website files (/www/wwwroot/anqicms.comAll files under the directory). You can log in to the database management tool (such as phpMyAdmin, Navicat, etc.) to export the database and download the entire website directory via SFTP or file manager.This is your last line of defense against any unexpected situations that may lead to data loss.

secondly,Check your server environment. The AnQiCMS v3.x version recommends using Baota Panel 7.9.3 or higher for Go project deployment.If your Baota panel version is lower, please consider upgrading the Baota panel first.If it is not a Baota environment, ensure that your Linux system meets the requirements for running Go language applications.

Finally, it is recommended that youRead the AnQiCMS v3.x update log carefullyUnderstand all the changes in the new version, including the potential compatibility issues, especially the restructuring of template tags.A clear understanding of the new version will help you quickly adapt and make use of the new features after the upgrade.

Upgrade path: single site and multi-site strategies

The upgrade from AnQiCMS v2.x to v3.x differs mainly depending on whether you manage multiple AnQiCMS sites.

Scene one: Smooth upgrade of a single AnQiCMS site

If you are currently running only one AnQiCMS v2.x site, the upgrade process is relatively direct, but it includes the conversion of deployment modes.The v3.x version strongly recommends using the "Go Project" for deployment to achieve better management experience and stability.

  1. Perform core program upgrade (backend operation, if provided)First, try to log in to your v2.x website backend, and check if there is an online upgrade feature to the latest stable version.If provided, please upgrade to the latest available version via the backend.After the upgrade is complete, the site should be restarted through the existing scheduled tasks. If the background version number has not been updated, further processing may be required.

  2. Convert to Go project deployment modeConsidering the complexity of v2.x deployment and the limitations of background restarts, v3.x recommends that you manage AnQiCMS as a Go project on the panel.

    • First, find the scheduled task corresponding to your current v2.x site, temporarily stop it, and remove it from the task list.
    • Next, in the Baota panel (or any panel that supports Go project deployment), locate the "Website" or "Go Project" management page, and select "Add Go Project".
    • When configuring the project, you need to specify the correct 'project execution file' (i.e., the executable file of AnQiCMS, usually located in the root directory of your website), set the 'project port' (default 8001), and ensure the 'running user' is correct.Bind your domain and check the 'Boot up' option.
    • After adding the project, the new Go project deployment will take over your AnQiCMS site without the need for a reinitialization installation, it will directly continue with the data of your existing site.

Scenario two: Upgrade of centralized management of multiple AnQiCMS sites

If you are currently running multiple independent AnQiCMS v2.x sites, the multi-site management feature of v3.x will be the biggest highlight of your upgrade.By an upgrade, you can integrate all sites under a single AnQiCMS v3.x instance for unified management.

  1. Stop and clean up all v2.x instancesFirst, you need to stop all running v2.x AnQiCMS instances one by one, and delete all the startup scheduled tasks they have configured on the server.This is the crucial step to ensure there is no conflict between the old and new systems.

  2. Deploy or upgrade the main AnQiCMS v3.x instanceIf you have already upgraded a v2.x site according to "Scenario One" and converted it to a Go project deployment, it will become your main v3.x instance.If you do not have any v3.x instances yet, you need to deploy a new AnQiCMS v3.x instance according to the v3.x installation document (such as the Baota panel Go project deployment tutorial) and complete the initial installation.This instance will take on the management functions of all sites.

  3. Add other sites to the main v3.x instance:Log in to your v3.x AnQiCMS backend and go to the "Multi-site Management" feature.

    • Click on "Add New Site", the key point at this moment isReuse the data and file structure of your existing v2.x site.
    • Please fill in the "site name" as required.
    • “Site Root Directory”Enter the actual file root directory of your original v2.x site (for example, if your old site A's directory is/www/wwwroot/old-siteA.com/, enter this path here).
    • “Website address”fill in the domain name of the old site.
    • “Administrator account password”is set for the new site and is different from the old site.
    • “Database name” please fill in the database name used by your old v2.x site.
    • Check the option 'Reuse default database account information', because in Docker or Go project deployment mode, the main instance usually has the permission to manage all databases.
    • Select the appropriate template.
    • Repeat this step to add your