The whole process of migrating WORDPRESS using SSH

The whole process of migrating WORDPRESS using SSH

I just moved house, let me tell you about the process.
1. Back up the original website data
1. Log in to the original server's SSH and enter the following command to package the site's files into a compressed package.
tar -czvf olesite.tar.gz *
2. Use the mysqldump command to export the database to a file:
mysqldump -u database username -p database password database name shuju.sql
2. Restore data in new space
1. Log in to the new server's SSH and use the wget command to download the backup file to the new server.
wget http://oldname.com/olesite.tar.gz
wget http://oldname.com/a.sql
2. Unzip the downloaded backup file
tar -xzvf olesite.tar.gz
3. Import the database file. If there is no database, please create it first.
Commonly used source commands to enter the MySQL database console, the command is
mysql -u username -p password
/usr/local/mysql/bin/mysql -uroot -ppassword
Select Database
mysql>use database and then use the source command, followed by the .sql file
mysql>source 123.sql
After the import is complete, use exit to exit the MySQL database console.
3. Delete the backed up files and test the new website.

<<:  (MT)MediaTemple host lifetime discount code

>>:  DOWNTOWNHOST 50% off discount code

Recommend

Krypt: $35/month/2GB memory/80GB space/500GB traffic/VMware/Singapore

Krypt, a famous American hosting provider, is sta...

Domestic commonly used CDN public library acceleration service

1. Baidu CDN public library Baidu public CDN prov...

Rootwelt: €4.95/month/1GB RAM/20GB SSD space/unlimited traffic/Xen/Germany

Rootwelt is a British hosting company, founded in...

LinkAlone is a fraud

I have introduced LinkAlone's hosting before,...

WootHosting: $10/year/512MB RAM/10GB storage/2TB bandwidth/KVM/Los Angeles/Miami

WootHosting, an American hosting company, was fou...

vpsdime: $5/month/4 CPUs/6GB RAM/30GB SSD/2TB bandwidth/OpenVZ

It was introduced before, it was $7/month, now it...

VortexNode: $4/month/1GB memory/75GB hard disk/1TB bandwidth/KVM/Canada

VortexNode, founded in 2013, is a subsidiary of L...

GreenCloudVPS 8GB RAM 1Gbps Bandwidth Japan/Direct KVM VPS Review

Details: GreenCloudVPS: $3/month/1GB RAM/15GB SSD...