Site Data Migration Complete — A Summary of the WordPress Move

When you see this article, my site has moved to a new place — Hong Kong — and changed its domain. The previous domain had a hyphen, which I disliked, and it was also filed (ICP). I still like freedom, and took the chance to do a big update, because this new domain was registered on my 20th birthday, for 10 years at once, so no more changes.

The new site also changed its theme. Before it was a fixed-width theme; now, with browsers all going HTML5 and more phones and tablets, I chose an HTML5+CSS3 theme, responsive layout. Change your browser width and you’ll see — pretty great, right?

WordPress migration steps:

  1. Back up the site files and data
  2. Back up and export the data in the database (most important — everything is here)
  3. Modify wp-config.php, which holds WordPress config info; mainly change to the new database address, username, and password
  4. Import the database file
  5. Upload the site files

Problems encountered:

When exporting with phpMyAdmin, I found Chinese had become question marks — wrong, the data was corrupted. How to fix? When logging into the phpMyAdmin main interface, the language must be set to Zh-UTF-8, not Zh-gb2312; if wrong it becomes question marks. Same when importing.

The site also changed its domain. After the new site is ready, set a 301 redirect from the old domain to the new domain address, then go to Baidu Webmaster Tools and Google Search Console to submit the site-change info; this speeds up the search engines’ processing and PR transfer.