What should be done before upgrading to the new version?

📅 2026-11-01 👁️ 0

What to do before upgrading to the new version? Three things: a recoverable backup, a clear rollback path, and a credential rotation after the upgrade. Many sites treat the upgrade as 'clicking update', and only find out that the backup can only restore the database, and the static files are not saved together. When rolling back, the template and data version do not match. If the sequence is correct, the upgrade itself is very fast.

What backup to leave before the upgrade

Ensure that the backup covers all the necessary content to recover: database data and uploaded static files (images, attachments, generated cache pages) together. Websites that only back up the database will appear with 'Data is back, image 404' after rollback. After the backup is completed, perform a recovery drill - restore this backup on another machine or another set of environments to see if the backend can be opened. Unverified backups are equivalent to no backups.

Simultaneously record the current version number and database structure version, AnQiCMS current version is v3.6.6, released on October 8, 2026. If the site has not been updated for a long time, first confirm which version you are on, then decide whether to upgrade in one step or do it step by step, it is easier to locate problems when upgrading across many versions.

Why should security fixes be grouped together

Some version updates are not just changes in functionality. v3.6.6 fixes two high-risk issues: the first is a SQL injection in the list sorting parameter, where the order sorting parameter passed from the template and interface originally only checked the first and last characters, which could be constructed into time-based blind injection, dragging out database content character by character, including the administrator password hash. The fix is to change to a strict identifier whitelist, which only accepts column names, table names dot column names, and ascending/descending order markers, and discards the rest and falls back to the default sorting;The password hash is used as the login key for multi-site switching login, the random string can be repeatedly generated, the ticket never expires, once the hash is leaked, it is equivalent to long-term password-free login, after the fix, it is changed to a one-time ticket issued by the server, the key is changed to the site's own signature key, valid for 120 seconds and失效 after one use.

The key point here is that the attacker may have already obtained the database content and login sessions. Therefore, the official upgrade prompt explicitly stated that simply upgrading is not enough to clear the sessions obtained by the attacker, and it is necessary to rotate the signature keys of all sites and change all administrator passwords after the upgrade, and only after completing these two steps with a comma can it be considered closed.

The order of the upgrade window

First select the off-peak period, then display the maintenance reminder, and then proceed in the order of 'backup, stop writing, upgrade, verify, and restore access'. This step of stopping writing is particularly useful for sites with a large amount of content, to avoid new data generated during the upgrade process falling into the old structure.The deployment method affects the rollback path: for Docker image deployment, the rollback involves cutting the image tag back to the previous version, without affecting the data volume; for one-click deployment on panels like Baota Panel, the rollback requires using the panel's version rollback or directly restoring from a backup, and confirm that the old version package can be retrieved from the panel before upgrading.The system listens on port 8001 by default, providing access from the reverse proxy. After the upgrade, if you encounter issues such as 'The background can be opened, but the front-end style is messy', first check if the proxy configuration has been reset.

Keep the terminal session and log output during the upgrade, so that you can immediately see which step fails when an error occurs, which is faster than looking through the logs later. For sites with large amounts of data, the structure change script may take a long time, so do not do this during off-peak hours.

The checklist after the upgrade

Check in order: Can the backend log in, has the administrator password been changed, and has the signature key been rotated? Is the front page, list page, and detail page rendering normally? Are the static rules and sitemap still the same as before the upgrade? Can forms and messages be submitted? Are the API calls still returning the same fields? After that, confirm that the backup task is re-enabled - the automatic backup that was paused for convenience during the upgrade is the easiest to forget to turn on. If the site has been hacked, in addition to rotating the keys and changing the password, you also need to check if hidden scripts have been written into the administrator account list and templates.

Common questions

Can we not upgrade the minor version?Versions with security fixes should not be skipped. Functional minor versions can be delayed, security versions should be done as soon as possible, the judgment basis is the fixes in the update description rather than the size of the version number.

Should content be exported before upgrading?It is recommended to export a parseable backup, such as a compressed package or a batch import file in table form, in case the structure changes and there is a problem, it can still be read by another system.

Will data be lost after rollback?The new content added during the upgrade may not be readable back due to inconsistent structure. This is why it is required to stop writing and use the same backup to restore data and static files after rollback.

How often should a recovery drill be done?At least once every quarter, an additional one before a major version upgrade. The focus of the drill is the time from backup to accessibility, not the existence of the backup file.

Related articles

Is the free quota of the message form verification code enough?

Determine if the free quota is sufficient, first calculate your actual monthly submission volume instead of the access volume. The free tier of the plan charged by the number of evaluations is up to 10,000 times per month, not based on the access volume; another type of interactive verification plan is unlimited in the number of challenges, but limited in the scale of access. This article provides an estimation method, access sequence, and fallback plan, and explains how to handle submissions that cannot be blocked using in-app review and email reminders.

2026-11-01

How long will it take for a new page without active push to be indexed by search engines?

When a new page does not perform active push, the time for inclusion depends on the speed at which the search engine discovers it, usually one order of magnitude slower than the submission push. This article explains that active push solves the timeliness of notification, and site map solves the master list, both of which cannot be substituted for each other, and provides the order of access to in-site link push, Baidu push, and Bing submission interface, as well as the method of checking the ratio of repeated push to inclusion.

2026-11-01

When deploying the site using a container image, do you need to install the runtime environment version separately?

Whether the program itself is built-in with the runtime. Interpreter-based technology stacks still need to install the runtime separately, the layer installed in the container image is exactly this one, the host machine's version will not take effect automatically; Programs developed with GoLang come with the runtime after compilation, the image only needs to provide the system dependencies and configuration. Both need to distinguish between the minimum version and the recommended version, and regression testing should be performed after the modification.

2026-11-01

It is more stable to upgrade on which day of the week when updating the description only includes security fixes.

When updating the description with security fixes, it should not wait for the weekend or the end of the month as per the regular schedule. According to the version plan information verified on the day, the functional version has a clear release date that can be announced in advance, while security fixes are often released outside of the plan. The safe window is during the morning hours on Tuesday or Wednesday when someone is on duty, avoiding Friday and before holidays, leaving a rollback point before the upgrade, and recording the version and verification results after the upgrade.

2026-11-01

How to connect the translation process when the two Chinese and English sites share the same backend

When the Chinese and English sites share the same backend, first configure the multi-language sites and switches, then process the content: existing pages use whole-page HTML translation to take over, new content is created separately by language, consistency of terminology relies on keyword library and site-wide replacement, and updates of the two sets of content use the same process for synchronization.

2026-11-01

When deploying a content system in container mode, what should be confirmed first: port mapping and data backup?

When deploying the content system in a container, first confirm the port mapping relationship between the exposed image and the host machine, and then place the upload directory and database on a persistent volume outside the container; the backup cannot only export the database, static files and configurations should be packaged together, and a recovery verification should be run in an isolated environment. Taking the AnQiCMS image that listens on the default port 8001 as an example, this article provides the check sequence before going online.

2026-11-01

The running environment needs to switch to a new version line, can I take a server for gray-scale testing first and then cut over to the full scale

When changing the version line of the running environment, you can first take a server with the same configuration as production for gray release, and then switch in batches. There are three prerequisites: the gray release copy is consistent with the production configuration, the version line expiration time is confirmed, and the rollback can be restarted on the original version line. This article explains how to cut gray release batches, monitor three types of compatibility differences, and the operation sequence of switching and rolling back.

2026-11-01

The contact form is flooded with spam submissions, should you add honey trap fields first or implement captcha verification first.

When a form is flooded with spam submissions, first add hidden honey pot fields, and then decide whether to implement CAPTCHA based on the remaining spam volume. Honey pots are effective against script submissions that do not parse styles and do not disturb real visitors; CAPTCHA has a cost, as it will block a portion of real users. In the statistics checked that day, robots accounted for forty-five percent of global network traffic, and more than half of the form submissions without protection were spam. The two layers should be implemented sequentially rather than simultaneously.

2026-11-01