Skip to content

Transfer wordpress from one vps to another

Transfer wordpress from one vps to another published on No Comments on Transfer wordpress from one vps to another

1. backup database
https://codex.wordpress.org/Backing_Up_Your_Database
mysqldump --add-drop-table -h db01.example.net -u dbocodex -p wp > blog.bak.sql

2. backup wordpress
ftp download the folder

3. setup lnmp as before

4. lnmp vhost add ***
modify config file, change content to the name, such as www.nicklj.com

5. lnmp database add ****

6. restore database
if mysql is lower than 5.6, error may happen
Unknown collation: ‘utf8mb4_unicode_520_ci’
refer: https://wordpress.org/support/topic/1273-unknown-collation-utf8mb4_unicode_520_ci/
For this, delete all the 520_, and save, then

cat ***.sql | mysql -u username -p databasename

Leave a Reply

Your email address will not be published. Required fields are marked *