Netease video cloud: flyover wordpress migration (moving) method

NetEase video cloud is a cloud based on cloud computing distributed multimedia processing cluster and professional audio and video technology, to provide customers with stable and smooth, low latency, high concurrent video broadcast, recording, storage, transcoding and on-demand Beep video PASS service. Online education, telemedicine, entertainment show field, online finance and other industries and business users only need to go through a simple development to create online audio and video platform. Now, NetEase video cloud to share with you about the word of the wordpress migration (moving) method

Previous blog on the original bluehost, the machine performance is poor, the network slow, open the home page to the old half-day, ready to migrate back to the country. Recently Netease pushed the honeycomb container cloud c.163.com, based on the whole SSD, BGP multi-line room to build, affordable price and enough, it is a good place to move, so immediately move hands.

First, create a wordpress container

1.png

Choose the minimum package, select workdpress4.3.1, and soon create a wordpress service, do not have their own to install a wordpress, it is not quite easy :). Container is the most recent technical term, I temporarily understood it as cheap and easy to use virtual machine, the minimum specification of the container, a month 29, and is all SSD storage, performance leverage. Network ping value <6ms, by contrast, bluehost 185ms delay is really bad.

2.png

Second, wordpress data migration
WordPress migration there are three ways ( http://www.51php.com/wordpress/5570.html ), Kaopu method is: 1) wordpress own import and export functions; 2) the whole station migration.
Of course, first try to import and export wordpress itself, but unfortunately each time to download to nearly 1M when the error encountered. It seems bluehost too stingy, to limit my site to move away.
So had to try the "whole station migration". 51php article gives a way to migrate to 51php, depending on the 51php provided by the tool. But it is hard to beat me because the essence of the migration is with the original site of the php page, and the database is copied to the new site.
1. Pack the site page log bluehost, find the wordpress site directory, labeled as a tar.gz package.
Tar czf bitstech.tar.gz bitstech /
2. Export the database first from the wp-config.php file to find the database address, DB_NAME is the database name, DB_USER is the database user, DB_PASSWORD is the database password, DB_HOST is the database address. Then use the mysqldump tool to export the database contents, and export the data to wordpress.sql.
Mysqldump -h localhost -uDB_USER -pDB_PASSWORD DB_NAME> wordpress.sql
3. Copy the page and database to the new site
Ssh login to create the wordpress container, ssh login can choose putty tool, but I in order to save trouble, directly with the honeycomb page on the webssh function. Webssh is the root user login, log on after the use of scp command from the blueshost copy bitstech.tar.gz, wordpress.sql these two files to the cellular container.
4. Import the database Honeycomb wordpress container has been running a mysql database instance, enter without mysql command to connect to the database. Execute in mysql:
Create database DB_NAME;
Use DB_NAME;
Source "/$path/wordpress.sql"
DB_NAME and $ path replace your database name, and wordpress.sql path
5. Import the page check the web server apache configuration file, found the honeycomb wordpress container site page stored in the / app directory. Unzip the third bit of the copied bitstech.tar.gz, replace all the contents of the / app directory. Of course, in order to avoid misuse, be sure to back up before the replacement / app directory.
Copy the file with the root account, but through the top command to find apache running under the www-data user, so the app directory owner to amend the www-data.
Chown -R www-data: www-data / app
6. Modify the database configuration Honeycomb wordpress container mysql user is root, no password, which is different from the original site. So adjust the wp-config.php DB_USER, DB_PASSWORD two data configuration.
7. Test site visit http://106.2.61.224/ to see if the page is normal.
Pictures, articles are still, everything looks pretty good, visit a lot faster.
8. Switch domain name My domain name in godaddy, login godaddy page binding www.bitstech.net domain name to the new ip address, patiently waiting for the domain name to take effect.

Third, write the last migration method is not limited to migrating from bluehost to the hive, as long as you understand the source station and the target station database address, and the directory where the page, you can use this method to migrate wordpress site.

    Heads up! This alert needs your attention, but it's not super important.