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

WootHosting: $11/year/500GB space/5TB traffic/Los Angeles

WootHosting, an American hosting provider, was fo...

Centos 7 installation of OpenNebula, create a KVM chicken tutorial

OpenNebula is an open source cloud computing basi...

Reprise Hosting: $26/month/4GB RAM/500GB hard drive/10TB traffic/2 IP/Seattle

Reprise Hosting, a long-established American host...

TOSHOST: $5/month/2G memory/300GB space/1TB traffic/OpenVZ/Phoenix

TOSHOST is an American hosting company establishe...

【Black Friday】XetHost: Hungary VPS Promotion

Deal 1 1 vCPU 512MB RAM 10GB SSD 1 IPv4 100 Mbit/...

GINERNET: 9.99 €/year/1 CPU/512MB RAM/5GB SSD space/100GB bandwidth/OpenVZ

GINERNET is a Spanish hosting provider, and its d...

JPStream: $28/month/2GB RAM/50GB SSD space/unlimited traffic/100Mbps/KVM/Japan

JPStream, a foreign merchant, was established in ...

Hostinap: $12/year/unlimited space/unlimited traffic/unlimited accounts

Hostinap, a US hosting provider, recently provide...