How do users of v2.x version of AnQi CMS smoothly upgrade to v3.x version? In-depth analysis and practical guide

As an experienced website operations expert, I am well aware of the importance of a stable and efficient CMS system for business.AnQiCMS (AnQiCMS) has become a powerful assistant for many small and medium-sized enterprises and content operation teams with its efficient architecture in Go language and rich features.With AnQiCMS constantly 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, each system upgrade may be accompanied by challenges, especially when the underlying architecture is optimized.AnQiCMS v2.x to v3.x upgrade, not just a simple version update, but also includes the innovation of deployment mode and multi-site management concept.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.v3.x version is designed to address these pain points, introducing a more modern and easier-to-manage Go project deployment model, and optimizing the multi-site management mechanism thoroughly.Therefore, this guide aims to help you understand the advantages of v3.x and provide a smooth, secure 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 operational experience.Firstly, it fully improves 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.

The second, 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 unified management of 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.

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,Make sure to perform 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 then download the entire website directory via SFTP or the file manager.This is the last line of defense to prevent any unexpected situations from causing data loss.

Second,Check your server environment.v3.x version of AnQiCMS recommends using Baota Panel 7.9.3 and above 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 update log of AnQiCMS v3.x carefullyUnderstand all the changes in features and potential compatibility issues brought by the new version, especially the restructuring of template tags.Have a clear understanding of the new version, which helps you quickly adapt and utilize new features after the upgrade.

Upgrade path: Single site and multi-site strategy

The upgrade from AnQiCMS v2.x to v3.x varies 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 straightforward, but it includes a deployment mode conversion.v3.x version strongly recommends using the "Go Project" deployment method for better management experience and stability.

  1. Upgrade the core program (backend operation, if provided)Firstly, try to log in to your v2.x website backend and check if there is a feature to upgrade online to the latest stable version.If provided, please upgrade to the latest available version through the backend first.After the upgrade is complete, restart the site using 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 backend restarts, v3.x recommends that you manage AnQiCMS as a Go project on the panel.

    • First, find the current v2.x site's scheduled task, temporarily stop it, and remove it from the list of scheduled tasks.
    • 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 'Start on boot'.
    • After the project is added, the new Go project deployment will take over your AnQiCMS site without the need for re-initialization installation, and it will directly continue using the data of your existing site.

Scene two: Centralized management upgrade 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 one upgrade, you can integrate all sites under a single AnQiCMS v3.x instance for unified management.

  1. Stop and clean up all v2.x instancesFirstly, you need to stop all running v2.x AnQiCMS instances one by one, and delete all the startup schedule tasks they have configured on the server.This is a critical step to ensure that the new and old systems do not conflict.

  2. Deploy or upgrade the main AnQiCMS v3.x instanceIf you have upgraded and converted a v2.x site to a Go project deployment according to "Scenario One", then 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 assume all site management functions.

  3. Add other sites to the main v3.x instanceLogin to your v3.x AnQiCMS admin panel, go to the "Multi-site Management" feature.

    • Click "Add New Site", the key point at this time isReuse the data and file structure of your existing v2.x site.
    • Please fill in the "site name" as per actual.
    • “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 old site domain.
    • “Administrator account password” set for the new site, different from the old site.
    • “Database name”Enter the database name you used in your old v2.x site.
    • Check the box for "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 put your