AnQi CMS, as a content management system favored by small and medium-sized enterprises and content operation teams, has been continuously evolving to provide more efficient and flexible services.The upgrade from version 2.x to 3.x is not just a change in version numbers, but also brings optimization of the underlying architecture and a leap in multi-site management mode.For those who have deployed multiple sites in the 2.x period and wish to achieve unified and efficient unified deployment in 3.x, this is undoubtedly an important milestone.
Before you embark on this upgrade journey, it is first important to clarify that the core advantage of AnQiCMS 3.x version lies in the simplification of deployment and centralized management of multiple sites.Different from the 2.x period, it may be necessary to deploy a separate AnQiCMS program for each site, the 3.x version allows you to pass throughAnQiCMS application instanceEfficiently manage multiple independent sites. This not only greatly reduces server resource consumption, but also simplifies daily operation and maintenance work.
Next, we will elaborate on the specific operation process of upgrading from AnQiCMS 2.x to 3.x and implementing the merging deployment of multiple sites.The entire process requires careful attention, but as long as you follow the steps, you will be able to transition smoothly.
The key preparation before the upgrade
Data security is of utmost importance for any system upgrade. Before starting, please be sure to carry out the following preparations:
- Comprehensive data backup:This is an indispensable first step. Please back up all your 2.x site data, including databases (such as MySQL) and file directories (
/www/wwwroot/anqicms.comThis type, as well as the root directory of your other sites). Place these backup files in a safe and independent location.This ensures that you can always recover to the state before the upgrade in case of any unexpected situations. - Determine the main upgrade site:In your 2.x sites, select one as the 'default site' for the first upgrade.This site will take on the role of the 3.x core application in the next steps.Generally, a site with moderate traffic and not very sensitive data is chosen to be processed first.
- Record the existing configuration:Carefully record the database information, root directory, bound domain, and reverse proxy configuration of each 2.x site.This information is very useful when merging and deploying a new site.
- Confirm the server environment:AnQiCMS 3.x has more friendly support for the "Go project" deployment on Baota panel, and it is recommended to use Baota panel version 7.9.3 and above.Ensure that your server environment meets the 3.x runtime requirements.
Second, upgrade the main upgrade site to AnQiCMS 3.x
At this stage, we will upgrade the selected 'default site' from 2.x to 3.x and convert its deployment mode to the Go project mode recommended by 3.x.
Log in and execute the in-site upgrade:First, log in to the back-end management interface of the AnQiCMS 2.x default site you have selected.Find the “System Update” feature and perform an online update to update the program to the latest 3.x version.After the upgrade is complete, it is usually recommended to restart the site service through the old scheduled task to ensure that the new version of the program is loaded.
- Tip:If after the upgrade, you find that the background version number has not been updated, this may be due to browser caching or an old program process not being completely terminated.You can try clearing the browser cache or later check the process and manually terminate it and restart.
Disable and remove the old scheduled tasks:AnQiCMS 2.x usually depends on the server's scheduled task (Cron Job) to monitor the process.And for the 3.x version, it is recommended to use the 'Go project' method for deployment in environments such as Baota panel, which comes with process protection and a more elegant start/stop mechanism.Therefore, after upgrading to 3.x, you need to log in to the server management panel (such as Baota), find andStop all old scheduled tasks related to the AnQiCMS site and then delete them.
Switch the site deployment mode to “Go project”:This step is the core of the 3.x deployment method.
- On the server management panel (taking Baota as an example), go to the "Website" menu and select "Go project".
- Click "Add Go project", fill in the relevant information in the pop-up configuration window.
- Project executable file:Point to the actual executable file path of the AnQiCMS application on your main upgrade site (for example:
/www/wwwroot/yourdomain.com/anqicms) - Project name:Enter a name that is easy to recognize, such as "AnQiCMS Main Application".
- Project port:Enter the port that the AnQiCMS program listens to on the main upgrade site (default is 8001).
- Execute the command:It is usually the same as the 'project executable file'.
- Run user:Suggested choice
wwwUsers. - Boot up:Check this option to ensure that the program runs automatically after the server restarts.
- Bind domain:Enter the domain name of your main update site.
- Project executable file:Point to the actual executable file path of the AnQiCMS application on your main upgrade site (for example:
- Click submit to complete the configuration. At this point, your main upgrade site has successfully run in the 3.x Go project mode and retained the original data and configuration.
Three, merge and deploy other AnQiCMS 2.x sites to the 3.x environment
Now, your AnQiCMS 3.x core application has been successfully run.Next, we will merge the original multiple AnQiCMS 2.x sites into this unified 3.x multi-site management system.
Disable and remove the scheduled tasks of other sites:For each AnQiCMS 2.x site that has not been upgraded, repeat the steps to disable and remove the old scheduled tasks mentioned above.Ensure that all old AnQiCMS 2.x program instances have been stopped and the corresponding scheduled tasks have been cleared.
Configure Nginx/Apache reverse proxy for new site:3.x multi-site management means that all sites will be processed by the same 3.x AnQiCMS application instance.Therefore, you need to configure Nginx or Apache reverse proxy for each site to be merged, forwarding their respective domain requests to the port that the main AnQiCMS 3.x application is listening on (for example: 8001).
- Take Baota as an example, create a “PHP project” (static) and configure reverse proxy:
- In the Baota panel "Website" menu, select "PHP Project", click "Add Site".
- Enter the domain name of the new site (for example:
dev.anqicms.com), the root directory can temporarily be set to or copied from the root directory of the old site. The database option is "Do not create", PHP version
- Take Baota as an example, create a “PHP project” (static) and configure reverse proxy: