Before upgrading the AnQiCMS project, we need to pause the current service.This is not just a simple 'turn off' of the program, but a process that includes comprehensive planning and detailed operations.The following are several key steps and precautions I have summarized, hoping to help everyone successfully complete each upgrade.

Step 1: Comprehensive data backup, the foundation must not be shaken

The primary task of any system upgrade is to ensure the security of core data.AnQiCMS emphasizes the effective protection of data assets through "resource storage and backup management", which is particularly important before the upgrade.We need to carry out multi-dimensional backups to provide a solid guarantee for any unexpected situations.

Firstly,Database backupis of great importance. All content data, user data, configuration information, etc. of AnQiCMS are stored in the database. It is essential to use the backup tools built-in to the database (such asmysqldumpCommand, or use the database backup function provided by panels such as Baota or 1Panel for a full backup.This includes the data table of the project itself as well as all custom content models.

Secondly,File system backupLikewise, it should not be ignored.This includes the core program files of AnQiCMS, customized template files, uploaded images, and other resource files./templateThe files under the directory), or a large amount of user-uploaded resources accumulated during website operation (for example/public/staticThe directory). This customized content is your valuable asset and must be backed up completely.

Finally,Configuration file backupThe running parameters of AnQiCMS are usually defined inconfig.json

Step 2: Properly notify users, plan maintenance windows

As operators, we fully understand the importance of user experience.Before stopping the AnQiCMS service, be sure to inform users in advance and plan the maintenance window reasonably.Choose a time with low visitor traffic for the upgrade to minimize the impact on users.

Third step: Smoothly stop AnQiCMS service

Stopping the AnQiCMS service requires different methods based on your specific deployment environment, the purpose is to ensure that the program can exit safely and smoothly, avoiding data corruption.

  • For users deploying in a general command-line environment (Linux):If you are deploying manually, you usually have astop.shscript to smoothly shut down the service. You can directly execute it../stop.sh.stop.shUnable to close normally, or you may need manual intervention, you can uselsof -i:{端口号}commands (for examplelsof -i:8001) Find the port occupied by the AnQiCMS process, and then throughkill -9 {PID}The process will be forcibly terminated. However, please note that forced termination should be used as a last resort and ensure that data backup is completed.

  • For users deploying on panel environments such as Baota, 1Panel:These panels usually provide a graphical management interface.If you deploy AnQiCMS through the "Go project" in Baota or the "ContainerThis method usually performs an elegant shutdown.

  • For users deploying with Docker:If you are deploying AnQiCMS in a Docker container, the operation to stop the service is to stop the corresponding Docker container. You can usedocker stop <容器名称或ID>Command to stop the running AnQiCMS container.

  • For users of the Windows local development environment:When performing local testing or development on Windows, stopping the AnQiCMS service is usually done through Task Manager. You can open Task Manager, findanqicms.exeProcess it, then select “End Task” to stop it.

After stopping the service, take some time to confirm that AnQiCMS has indeed stopped running. You can try accessing the website through a browser, it should display a shutdown notice or be inaccessible; in the Linux environment, use it again.lsof -i:{端口号}Confirm whether the port has been released.

Step 4: Preparations and confirmation before upgrading

After the service stops, you can proceed with the upgrade operation.

Firstly,Carefully review the update log (changelog)This log will detail the improvements in new version features, fixed bugs, and most importantly—any changes that may affect existing configurations or customized content.Incompatible changes.This can help you predict the potential problems you may encounter during the upgrade and prepare for them in advance.For example, AnQiCMS upgrading from v2.x to v3.x mentions the changes in deployment methods, as well as the operation process for merging multiple sites.

Secondly,Download the correct new version installation package.According to your operating system and deployment environment (such as Linux or Windows), obtain the latest and most stable version of AnQiCMS from the official channel.

Finally, although we have made full backups, but a carefulRollback planIt is still necessary.This means you clearly know how to quickly restore to the previous state if the upgrade fails.Generally, this includes redeploying old versions of programs and recovering using the previous database and file backups.

By following these steps and注意事项, you will be able to perform AnQiCMS upgrades with greater confidence and safety, ensuring that your website always runs in the latest and most stable state.


Common Questions (FAQ)

Q1: In AnQiCMS upgrade completion, if there is no change in the background interface or website frontend, how should I investigate?A1: If the interface does not change after the upgrade, please first try to clear the browser cache, as the browser may cache old versions of static resources.If the problem still exists, please log in to the AnQiCMS backend, find the 'Clear Cache' feature, and manually clear the system cache.Finally, confirm whether your AnQiCMS service has been restarted.stop.shandstart.shWhether executed correctly, or directly throughkill -9After that, manually start it; in the environment using the panel, please check whether the status of the Go project or Docker container in the panel is started.

Q2: During the downtime of AnQiCMS service, what will my website visitors see?

Q3: How to determine if AnQiCMS service has completely stopped?A3: The most direct method under the Linux environment is to uselsof -i:{AnQiCMS项目端口}Check command to see if the port is still occupied.If the command does not output any results, it means that the AnQiCMS service has stopped.When using Baota or 1Panel and similar panels, you can directly view the status indicators of projects or containers.anqicms.exeProcess has been terminated. In addition, if you can access your website in the browser and see a maintenance message or cannot connect, it also indirectly indicates that the service has stopped.