Sat. Oct 24th, 2020

Pindah WP antar server

1. back up db

mysqldump –u USERNAME –p DATABASENAME > FILENAME.sql

2. back up file

tar cvzf wordpress.tar.gz *

3.  impor wp ke server baru

wget serverlama.com/wordpress.tar.gz

4. extract

tar -zxvf wordpress.tar.gz

5. create new DB

mysql -u root -p
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO "wp_user"@"localhost" IDENTIFIED BY "ENTER_A_PASSWORD";
FLUSH PRIVILEGES;
EXIT

6. import mysql dump file to DB

$ mysql -u username -p -h localhost DATA-BASE-NAME < data.sql 

7.Done

You may have missed