As an experienced website operations expert, I know that every system upgrade is like a精密的战役, the extent of preparation in the early stage directly determines the success or failure of the battle.AnQiCMS with its high performance and ease of use, indeed brings us a lot of convenience, but in the process of upgrading, especially in the phase of suspending service, we must be meticulous to ensure the safety of data and the smooth transition of business.

Before the AnQiCMS project upgrade, we need to suspend the operation of the current service.This is not just a simple 'turn off' program, but a process involving comprehensive planning and meticulous operations.The following are some key steps and注意事项 I have summarized, hoping to help everyone successfully complete each upgrade.

First step: comprehensive data backup, the foundation must be indestructible

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 possible emergencies.

first, database backupIt is of utmost importance. All content data, user data, configuration information of AnQiCMS are stored in the database. It is necessary to use the backup tools built into the database (such asmysqldumpCommand, or use the database backup function provided by panels such as Baota, 1Panel, etc. to perform a full backup.This includes the data table of the project itself and all custom content model data.

secondly,File system backupIt should not be overlooked. This includes the core program files of AnQiCMS, customized template files, uploaded images, and other resource files.Although the core program files can be re-obtained by downloading the latest version, you may have personalized the template (for example,/templateFiles in the directory), or a large amount of user-uploaded resources accumulated during website operation (for example/public/staticDirectory). These customized contents are your valuable assets and must be backed up in full.

Finally,Configuration file backup.AnQiCMS runtime parameters are usually defined inconfig.jsonIn the file, it contains port, database connection and other key information.In addition, if your website uses Nginx or Apache for reverse proxy, then the relevant pseudo-static rules and proxy configurations should also be backed up to prevent the need for reconfiguration after deploying the new version.

Step two: Notify users properly, plan maintenance window

As operators, we understand the importance of user experience. Be sure to inform users in advance before stopping AnQiCMS services, and plan the maintenance window reasonably.Choose a low-traffic period for the upgrade to minimize the impact on users as much as possible.

In the AnQiCMS backend "Global Function Settings", you can find the "Website Status" and "Site Shutdown Tip" features.During maintenance, set the website status to "closed" and configure a clear and friendly "closed site prompt" to inform users that the system is currently undergoing maintenance, the expected time of recovery, and any necessary contact information.This can not only prevent users from accessing error pages, but also effectively enhance users' trust in the website.

Step 3: Smoothly stop AnQiCMS service

Stop 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 damage.

  • For users deploying in the general command-line environment (Linux):If you are deploying manually, there will usually be astop.shscript to smoothly shut down the service. You can execute it directly../stop.shIfstop.shCannot 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, then usekill -9 {PID}The command forcibly terminates the process. However, please note that forced termination should be used as a last resort and ensure that data backup is completed.

  • For users deploying on Baota, 1Panel, and other panel environments:These panels usually provide a graphical management interface. If you deploy AnQiCMS through the Baota "Go Project" or 1Panel "Container" feature, you usually just need to find your AnQiCMS project or container in the corresponding management interface, click the "Stop" button.This method is usually performed in an elegant shutdown.

  • For users deploying on 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>The 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 and findanqicms.exeProcess, then choose "End Task" to stop it.

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

Step 4: Preparation and confirmation before upgrading.

After the service is stopped, you can start the upgrade operation.

first, Carefully review the update log (changelog) of the new versionThis log will detail the improvements in the new version, the fixed bugs, and most importantly - any changes that may affect existing configurations or customized content.Incompatible changesThis can help you predict the problems that may be encountered during the upgrade and prepare in advance.For example, AnQiCMS from v2.x to v3.x mentioned the change in deployment methods, as well as the operation process of merging multiple sites.

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

Finally, though we have made full backup, but a rigorousRollback planIt is still necessary. This means you clearly know how to quickly restore to the previous state if the upgrade fails.This usually includes redeploying old versions of the program and recovering using the previous database and file backups.

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


Frequently Asked Questions (FAQ)

Q1: After the AnQiCMS upgrade is completed, if the back-end interface or the website front-end does not change, 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 the static resources of the old version.If the problem still exists, please log in to the AnQiCMS backend, find the "Update Cache" feature, and manually clear the system cache.Finally, confirm that your AnQiCMS service has been restarted.In the Linux command-line environment, you can checkstop.shandstart.shWas it executed correctly, or did it go through directly?kill -9Later, start manually; in the panel environment, please check whether the Go project or Docker container in the panel is started.

Q2: What will my website visitors see during the AnQiCMS service shutdown?A2: If you enable the "Site Offline Status" and set the "Offline Notice" in the "Global Function Settings" as suggested, visitors will see the maintenance notification information you preset.This is a friendly approach that can effectively manage user expectations.If the shutdown notice or website status is not set, visitors may see the browser's default "Unable to access this site" error page, depending on your Web server (Nginx/Apache) configuration and whether the AnQiCMS service is completely stopped.

Q3: How to determine if the AnQiCMS service has completely stopped?A3: The most direct method under the Linux environment is to uselsof -i:{AnQiCMS项目端口}The command to check if the port is still occupied. If the command does not output any results, it means the AnQiCMS service has stopped.When using Baota or 1Panel and similar panels, you can directly view the status indicators of projects or containers.Under Windows environment, confirm via Task Manageranqicms.exeThe process has been terminated. Additionally, if you try to access your website in the browser and see a maintenance notice or are unable to connect, this also indirectly indicates that the service has stopped.