How to troubleshoot when the front-end page does not update after AnQiCMS program upgrade?

When you eagerly upgraded the AnQiCMS program, thinking that new features and optimizations would immediately appear on your website, only to find that the front-end page remains unchanged and stuck at the old version, this feeling really drives one crazy.Don't worry, this is usually not a big problem; it's mostly caused by caching or program loading mechanisms.Today, let's check it together in detail and see how to give your website's front-end a new look.

Why does the page not update?

AnQiCMS, as a high-performance application developed based on the Go language, runs its program files in memory after loading them to provide efficient and stable services.Therefore, when we complete the upgrade operation, if it is only the files that have been replaced without notifying the program to reload or restart, it will still use the old program code to render the page.In addition, to enhance access speed and user experience, browsers, the AnQiCMS system itself, and the reverse proxy of the server (such as Nginx or Apache) will all have their own caching mechanisms. These old caches may also hinder you from seeing the latest page content.

Understood these reasons, we can carry out targeted troubleshooting.

Troubleshooting and resolution steps:

Generally, we start with the simplest and most common steps and gradually delve deeper.

First step: Clear browser cache (the simplest and quickest way)

Many times, the problem lies in your browser's local cache. Browsers store the old version of website files to load pages faster next time.

  • On Windows or Linux systems, you can try pressingCtrl + F5key.
  • On macOS systems, you can try pressingCmd + Shift + Rkey.
  • If the shortcut key is not working, or you want to clean up thoroughly, you can manually enter the browser settings, find the "Clear Browsing Data" or "History" option, and select to clear cached images and files.

Second step: Clear AnQiCMS internal cache

AnQiCMS system also has a caching mechanism to accelerate page generation. After the upgrade, these caches need to be cleared so that the system can read the new configuration and template.

  • Log in to the AnQiCMS backend.
  • Find and click on 'System Upgrade' (or 'Update Cache', the specific name may vary slightly by version) in the left menu.
  • There is usually a "Update Cache" button or link on the page, click it to clear the internal cache of the system.

Step 3: Restart the AnQiCMS program (core step)

This is a key step to solve the problem of the front-end page not being updated.Because AnQiCMS is a standalone executable file compiled from Go language, it needs to be restarted to load new code and configurations.

  1. If you use Docker to deploy (for example, through 1Panel or aaPanel):

    • Log in to your dashboard (1Panel or aaPanel).
    • Find the 'container' or 'Docker' management interface, and locate the container instance running AnQiCMS.
    • Select this container, click the 'Restart' button. Typically, Docker will stop the old container and restart a container with a new image or file.
  2. If you use the Baota panel for Go projects or general projects deployment:

    • Log in to the Baota panel.
    • Find 'Website' -> 'Go projects' or 'Other projects' in the left menu.
    • Find your AnQiCMS project and click the corresponding "restart" button.
  3. If you are deploying manually through the command line (for example, using 翻译内容start.shandstop.shscripts):

    • Connect to your server via SSH.
    • Navigate to the directory where AnQiCMS is located (for example)/www/wwwroot/anqicms.com).
    • Firstly, run the stop script:./stop.sh. Wait for the program to completely stop.
    • Then execute the startup script:./start.sh.
    • Ensure the program has started successfully and there are no error messages.
  4. If you are testing locally on Windows:

    • Open Task Manager (pressCtrl + Shift + Esc).
    • In the "Processes" or "Details" tab, findanqicms.exeProcesses.
    • Select it and then click "End Task".
    • Double-click again.anqicms.exefile to start the program.

Step 4: Clear the server reverse proxy cache or CDN cache (if applicable)

If your website's frontend uses Nginx, Apache as a reverse proxy, and they are configured with caching, or if you are using a CDN service, these places may also cache old page content.

  • Nginx/Apache Cache:Generally, it is necessary to manually clear the cache directory of Nginx or Apache, or restart the Nginx/Apache service.The specific operation depends on your server configuration. If you are not familiar with it, it is recommended to consult the server administrator or refer to the relevant documents.
  • CDN Cache:If the website uses a CDN (Content Delivery Network), you need to log in to the CDN service provider's backend, find the corresponding website acceleration configuration, and perform a "refresh cache" or "preheat cache" operation.

Fifth step: Check file integrity and permissions (less common but should be considered)

Although uncommon, it may occur during the upgrade process that files are not fully replaced, files are corrupted, or file permissions are incorrect.

  • Re-upload:If the above steps are all ineffective, you can try uploading the latest AnQiCMS installation package to the server again and extracting it to overwrite (note that you should back up important data).
  • Check file permissions:Ensure that the AnQiCMS program files and their dependency directories (such as)template/publicThe permission of the [directory] allows AnQiCMS to run user read and write. Usually set towwwUsers have read and write permissions, while other users only have read permissions.

Summary and Prevention

In most cases, by clearing the browser cache, AnQiCMS internal cache, and restarting the AnQiCMS program, the problem of the front page not being updated can be resolved.After upgrading the program, develop the good habit of 'cleaning cache + restarting the program', which can effectively avoid such troubles.


Common Questions (FAQ)

Q1: Why is the backend management interface already showing the new version, but the front-end page is still the old one?A1: This is very likely because although the AnQiCMS program has loaded the new backend code, the template files, static resources, or data cache of the front-end page are still stuck in the old version.Please make sure to follow the steps above, first clear the browser cache, the 'Update Cache' feature in the AnQiCMS backend, and most importantly, restart the AnQiCMS program completely.If your website is still using Nginx/Apache reverse proxy or CDN, remember to clear their cache.

Q2: I just modified a template file, but the front-end page didn't take effect. Should I also execute these steps?A2: Yes, the front-end page not updating after modifying the template file is usually a cache issue.AnQiCMS will also use caching when rendering templates to improve efficiency.Generally, you just need to clear the browser cache and perform the 'Update Cache' function in the AnQiCMS backend.If it still does not work, consider restarting the AnQiCMS program.

Q3: The website cannot be accessed directly after the upgrade, or it prompts a 500 error. Is this the same issue as the front-end not being updated?A3: