Moving a WordPress weblog
May 25, 2006
From Weiqei Gao’s blog…
I haven’t done too much with the WordPress blog I created 122 days ago. But instead of throwing it away, I thought it a good opportunity to test how easy it is to move the blog over.
It indeed it easy. All I have to do is to move the MySQL database and the /var/www/html/wordpress directory from one computer to another:
[root@gao-2004] # mysqladmin -p –add-drop-tables wordpress > /mnt1/wordpress.mysqldump
[root@gao-2004] # cd /var/www/html
[root@gao-2004] # tar cf /mnt1/wordpress-files.tar wordpress
[root@gao-2006] # mysqladmin -p create wordpress
[root@gao-2006] # mysql -p wordpress grant usage on *.* to weiqi identified by password
> grant delete, select, insert, update on wordpress.* to weiqi
[root@gao-2006] # cd /var/www/html
[root@gao-2006] # tar xf /mnt1/wordpress-files.tar
where weiqi/password is the username/password pair I gave to WordPress when I did the five minutes install back then.