Simple Application Server is a website hosting service. Alibaba Cloud continuously optimizes the specifications, performance, and stability of simple application servers. We recommend that you use simple application servers for website hosting. This topic describes how to migrate a website from a Web Hosting instance to a Linux simple application server.
Prerequisites
- FileZilla is downloaded and installed.
- Xshell is downloaded and installed.
- Navicat Premium 16 is downloaded and installed.
- The FTP and database information of the Web Hosting instance is obtained. The information includes FTP logon username, FTP password, database name, and database password. For more information, see Create a Web Hosting instance and check instance information and View and manage database information.
Background information
Web Hosting is an early website hosting service launched by Alibaba Cloud. Alibaba Cloud no longer updates the service and the outdated underlying architecture of the service cannot ensure the performance and stability of websites. We recommend that you migrate the websites deployed on your Web Hosting instance to a simple application server for hosting and maintenance. For more information about Simple Application Server, see What is Simple Application Server?.
- Web Hosting instance: the economic edition
- Simple application server: the China (Hong Kong) region and the application image LAMP 7.4
Procedure
- Step 1: Create a simple application server
- Step 2: Back up the website data that is stored on the Web Hosting instance
- Step 3: (Optional) Back up the database data that is stored on the Web Hosting instance
- Step 4: Migrate the website data to the simple application server
- Step 5: (Optional) Migrate the database data to the simple application server
Step 1: Create a simple application server
Select the application image LAMP 7.4 and the China (Hong Kong) region to create a simple application server in the International site (alibabacloud.com). For more information, see Create a server.
Step 2: Back up the website data that is stored on the Web Hosting instance
Step 3: (Optional) Back up the database data that is stored on the Web Hosting instance
- Obtain the username, password, and endpoint of the database.
- Log on to the Web Hosting console.
- On the Host List page, find the Web Hosting instance from which you want to migrate a website. Click Manage in the Operation column to go to the Instance Details page.
- In the Database section, view the username, password, and endpoint of the database.
- Connect to the database.
- Back up the database data.
- Double-click the name of the database to be backed up to open the database.
- Right-click the database name and choose
.
- In the dialog box that appears, save the SQL file to a specified storage path.
- If the following figure appears, the SQL file is dumped. Click Close.
Step 4: Migrate the website data to the simple application server
You can use Xshell to upload the website data that is stored on the Web Hosting instance and backed up on your local computer to the simple application server.
Step 5: (Optional) Migrate the database data to the simple application server
If no database is deployed on your Web Hosting instance, skip this step.
- In the Simple Application Server console, add Port 3306. For more information, see
Add a firewall rule.
- Obtain the username and password of the simple application server database.
- Log on to the Simple Application Server console.
- In the left-side navigation pane, click Servers.
- In the left-side navigation pane, choose .
- In the LAMP Information section, click Copy and then click Connect.
- In the remote desktop that appears, right-click the blank space, paste the command
that you copied, and press Enter to view the username and password of the database.
- Connect to the database.
- Create a database that has the same name as the database on the Web Hosting instance.
- Right-click the connection name of the database and click Create Database.
- In the dialog box that appears, enter the database name. Enter test in this example.
- Click OK.
- Right-click the MySQL database on the simple application server and select Execute SQL File.
- In the dialog box that appears, click... and select the backup SQL file that you saved in Step 3: (Optional) Back up the database data that is stored on the Web Hosting instance.
- Click Start and wait until the execution is successful.
What to do next
- If a database is deployed on your Web Hosting instance, perform the following operations:
- Modify the connection configurations of the database in the website program to the information of the database on the simple application server. For information about how to obtain the information of a database on a simple application server, see Obtain the username and password of the MySQL database.
- Change the connection string of the database in the website program. For more information, see What are the paths to the configuration files of common third-party open source databases?.
- Bind the domain name of the website to the simple application server and resolve the domain name. For more information, see Bind and resolve domain names.