Detailed guide on smoothly upgrading AnqiCMS 2.x to 3.x version

As an experienced CMS operation person in the security industry, I know that every version upgrade is crucial for the stable operation of the website and the efficiency of content management.AnqiCMS upgraded from version 2.x to 3.x, not only bringing performance optimization and functional enhancement, but also innovating in system deployment and multi-site management, especially through the 'Go project' management method, making system maintenance simpler and more efficient.This article aims to provide you with a clear and comprehensive upgrade path to ensure a smooth transition to the 3.x new version.

Preparation before the upgrade

Before starting any system upgrade, the most core principle is that 'data is invaluable, backup first'.You must thoroughly backup your current AnqiCMS 2.x version.

First, please make a complete backup of your database. You can use the database backup function provided by server management tools like Baota panel, or export an SQL file via the command line.

Next, perform a full backup of your website files.This includes AnqiCMS program files, uploaded images, custom templates, and all configuration-related files.You can directly package the entire website root directory in case of emergency.

After the backup is complete, it is recommended that you spend some time reviewing the current 2.x version of the running environment.Although the 3.x version has been optimized in terms of architecture, ensuring that your server resources are sufficient, such as memory and disk space, is still the foundation for smooth system operation after the upgrade.

Understanding the differences between versions is also the key to smooth upgrades.AnqiCMS 3.x introduces official support for the Baota panel's 'Go project', which greatly simplifies the deployment and management of the program.article/productLabel, addedarchiveThis means that if you have customized frontend templates, they are likely to need corresponding modifications to be compatible with 3.x.

Core upgrade process: migration station by station

The design concept of AnqiCMS 3.x version is to achieve unified management of multiple sites, rather than deploying independent program copies for each site as in 2.x.Therefore, the upgrade process will be divided into two stages: main site upgrade and multi-site integration.

Step 1: Select and upgrade the main site

On your server, select a currently running AnqiCMS 2.x instance as your main site (i.e., the instance you usually log into to manage multiple sites).Log in to the backend management interface, upgrade it to the latest 3.x version through the 'System Upgrade' feature.This operation will update the underlying files of the program.

Step 2: Smoothly transition the main site operation environment

After completing the background upgrade operation, the new version of the file has been deployed, but the program may still be using the old process.At this time, you need to configure the scheduled task for the site using the original 2.x version (for examplestart.shScript), try to perform a restart operation to ensure that the new version of the program is loaded correctly.

If after a restart, you visit the back-end and find that the interface or version number has not been updated to 3.x, this may be due to browser cache or an old process not having been completely stopped.You can try to refresh the browser forcibly (usually Ctrl+F5 or Shift+F5) to clear the cache.lsof -i:{端口号}Find the process ID and thenkill -9 {PID}Terminate), then run the original scheduled task script again to start AnqiCMS.

Step 3: Switch to Go project management mode

After the main site is confirmed to have been upgraded to 3.x and is running normally, you can start optimizing its operational management.First, stop and delete the scheduled task configured for the main site in the 2.x version.

Next, if you are using Baota panel, please go to the 'Website' menu under the 'Go project' feature.Click "Add Go project", configure your main site according to the deployment guide for version 3.x.The executable file of the project should point to the upgraded AnqiCMS executable file (for example/www/wwwroot/anqicms.com/anqicms),Please fill in the port of your AnqiCMS project as default or configured (for example, 8001).Since your data has been upgraded on the backend, adding a Go project here will not trigger the initialization steps but will take over directly.

The fourth step: merging and optimizing multiple sites

For the AnqiCMS 2.x that was originally deployed independently on the same server