The daily operations of website management cannot be separated from the system upgrade and maintenance.When AnQiCMS (AnQi CMS) is upgraded, we sometimes encounter a situation where the backend interface does not move, or the project is directly **, refusing to start.Don't worry, as an experienced website operation expert, I know this anxiety well, and I am also clear that the methods to solve these problems are not complicated.Today, I will come and explain in detail how we should calmly respond when these situations occur after the AnQiCMS upgrade.


After the upgrade, the background interface did not update? It may be that these 'little devils' are playing around

The website upgrade is something that is eagerly anticipated, meaning new features and more stable performance, but if the back-end interface is still the same after the upgrade, it really makes one feel puzzled.In fact, this is mostly not a big problem with AnQiCMS itself, but several 'little guys' are causing trouble behind the scenes.

Firstly, the most common culprit isBrowser cache. Your browser stores the content of visited web pages (including JS, CSS, etc.) locally to speed up loading.When AnQiCMS is upgraded, especially when the backend interface has been updated with UI changes (for example, AnQiCMS v2.1.0 version has replaced the new backend management interface), the browser may still be loading old cached files, causing you to see the old interface.

The solution is:Simple and direct. Try to force refresh the browser (usually on Windows systems isCtrl + F5, on macOS isCmd + Shift + RIf invalid, then you need to completely clear the browser cache and cookies.There are slight differences in the operation path of different browsers, but they are largely the same. Usually, you can find the option to 'Clear browsing data' in 'Settings' or 'History records'.After cleaning up, re-visit the AnQiCMS backend, you are likely to see a brand new interface.

Secondly, if the background interface does not update after clearing the browser cache, then consider that the old process may still be running.The old process may still be running.. AnQiCMS is developed in Go language, and the program is compiled into an independent binary file.An upgrade usually involves replacing this binary file. However, if the old process is not terminated correctly, the new binary file cannot take effect, and the website is still served by the old version of the program.

The solution is:It is necessary to manually restart the AnQiCMS service. If you have deployed it using visual management tools such as Baota Panel, 1Panel, etc., usually you can find the AnQiCMS service in the corresponding Go project or Docker container management interface, select the "restart" operation.These panels usually help you automatically stop old processes and start new ones.

If you are deploying manually via the command line, there will usually be astart.shThe script to start AnQiCMS. In this case, you need to manually stop the old AnQiCMS process first, and then run itstart.shStart a new process. How do you stop it? Usually, you can do it bykillcommand, combinedlsoforps -efto find the process ID (PID) of AnQiCMS.

For example, to find the process occupying the default AnQiCMS port 8001:lsof -i:8001After finding the process ID (PID), usekill -9 PIDThe command forces the process to terminate. Then, run your startup script (such as./start.sh), or directly execute the AnQiCMS binary file to take over the service of the new version program.


Project startup exception? Check step by step, the problem is nowhere to hide

After AnQiCMS is upgraded, the project fails to start directly, the website cannot be accessed, which is often a more serious problem.But this is not the end of the world, we can investigate step by step like detectives, and eventually make the problem disappear.

First, and the most important step is,Check the AnQiCMS runtime log。AnQiCMS starts up and, if errors occur, it usually outputs them to the console or writes them to a log file. If you usestart.shscript starts up, the logs are usually redirected torunning.log(Referencestart.shin the scriptnohup $BINPATH/$BINNAME >> $BINPATH/running.log 2>&1 &Read the error messages in the log carefully, as this can often directly locate the problem, such as database connection failure, configuration errors, missing files, etc.

secondly,Port conflictOne of the common reasons for project startup exceptions. Especially when installing multiple AnQiCMS instances on the same server, each instance needs to occupy a different port.If you do not notice this during the upgrade process, or if another program is using the port required by AnQiCMS (the default is 8001), AnQiCMS will not be able to start.

The solution is:Uselsof -i:{端口号}for examplelsof -i:8001Command to check which process is using the port. If you find other processes using it, you can choose to terminate the process(kill -9 PID) or modify the AnQiCMS configuration fileconfig.json, and assign itportChange the parameter to an unoccupied port number and then restart AnQiCMS.

Moreover,Database connection issueIt may also cause the startup to fail. Upgrading AnQiCMS sometimes involves changes to the database structure, or incorrect database configuration information may be entered during a new installation.The solution is:Checkconfig.jsonThe database connection configuration in the file, ensure that the database type, host address, port, username, password, and database name are all correct.At the same time, also confirm that the database service itself is running normally, for example, whether the MySQL service has been started.If using MySQL deployed with Docker, ensure that the MySQL container is running normally.

Furthermore,File or directory permission issueIt is also a common fault point on Linux servers. Especially after manually uploading or extracting the AnQiCMS installation package, if the file and directory permissions are not set correctly, AnQiCMS may not be able to read the configuration files or write logs, etc., leading to startup failure.The solution is:Ensure the AnQiCMS running user (usuallywwwThe user or the user you customize has read and write permissions for the AnQiCMS installation directory and its subdirectories. You can usechmod -R 755 /path/to/anqicmsandchown -R www:www /path/to/anqicms(Please move the/path/to/anqicmsReplace it with the actual installation path) to correct the permissions.

Finally,configuration fileconfig.jsonFormat errorIt may also confuse AnQiCMS when it starts up.Although AnQiCMS configuration is relatively simple, the JSON format has strict syntax requirements, such as missing commas, mismatched quotes, and unclosed curly braces, all of which can cause parsing failures.The solution is:Check with an online JSON validation toolconfig.jsonCheck if the file syntax is correct. Even the slightest spelling error can cause the startup to fail.


Prevention first: Make the upgrade process smoother

To avoid the occurrence of these problems, some good operational habits and preventive measures are crucial:

  • Backup, backup, and backup:Before performing any upgrade operations, be sure to back up the AnQiCMS program files and database.This is the golden rule of any system upgrade, which allows you to survive in the worst case.
  • Read the update log and upgrade guide:AnQiCMS'changelog.mdDetails of each version update will be recorded. In particular, for major version upgrades, developers will usually provide detailed upgrade guides.Read these documents carefully, and it will allow you to understand in advance the possible problems and precautions you may encounter.
  • Restart after clearing the cache:After the upgrade, develop the habit of clearing the browser cache first, then restarting the AnQiCMS service. This ensures that you are using the latest version of the program and interface.

Having mastered these knowledge and skills, you will be able to calmly deal with any "little incidents" after the AnQiCMS upgrade and ensure the continuous and stable operation of the website.


Frequently Asked Questions (FAQ)

  1. Ask: Why does the backend interface not change after I upgrade AnQiCMS according to the steps? Answer:This is usually due to the browser cache not being cleared, the browser is still loading old interface files. It is recommended that you try to force refresh the browser (Windows pressCtrl + F5, macOS pressCmd + Shift + R), or completely clear the browser cache and cookies.If still invalid, please check if the old process of AnQiCMS has been stopped and restarted correctly, and ensure that the new version of the program has taken effect.

  2. Ask: When AnQiCMS starts, it prompts that the port is occupied, how can I solve it? Answer:Port conflict is a common startup problem. You can uselsof -i:{端口号}for examplelsof -i:8001)Command to find the process that occupies the port required by AnQiCMS. After finding the process ID (PID), usekill -9 PIDCommand to terminate it. Then, you can try to restart AnQiCMS. If you want to solve this problem permanently, you can modify AnQi