I've done my fair share of migrating Wordpress sites, but today I am completely and utterly stumped. I've worked for many hours on this, and I cannot find a solution. I hope someone here can help.

I have a site that I'm trying to migrate from my local testing server to www.mysite.com (not the actual URL). On the testing server, I have my hosts file set up so my site is located at www.mysite.cam. Therefore, I can do a find-and-replace on the database without messing up serialized data (because the string lengths are the same for both URLs).

I performed the usual migration routine:

1) Back everything up
2) Export testing server database to sql file.
3) Find and replace mysite.cam with mysite.com in the sql file.
4) Sync the remote directory in WinSCP
5) Import the sql file to the new database

Note: My wp-config.php file is host-independent, so it doesn't need to be changed. I use $_SERVER["HTTP_HOST"] to detect the host and use the right MySQL credentials.

When I try to access my site, I've lost the main navigation menu, as well as many of my plugin settings. It looks like serialized data got messed up in the wp-options table, but (as you can see from above), nothing did. I even tried using the WP Migrate DB plugin (which can handle serialized URLs) with the exact same results. I tried doing the migration multiple times, on different URLs, with no avail.

I also get some kind of database error from WP Super Cache the first time the site loads after being migrated. I tried disabling WP Super Cache, but it didn't help any of the problems.

I could change the plugin settings that got messed up, but there are many plugins and many settings to change. Furthermore, I'm worried something else is broken that is not yet apparent.

I just simulated an migration (and did a find-and-replace of the URLs in the database) on my test server. Everything worked fine. That means the problem is on the end of the web host.
–
user16935Jun 10 '12 at 16:24

Folks, I think I solved the problem! I switched the import file from UFT-8 to ANSI encoding, and the site appears to be working fine. I guess moving between Windows and Linux machines, encoding is really important. I've never had this problem before, but I will watch out for it in the future.
–
user16935Jun 10 '12 at 16:30

2 Answers
2

Folks, I think I solved the problem! I switched the import file from UFT-8 to ANSI encoding, and the site appears to be working fine. I guess moving between Windows and Linux machines, encoding is really important. I've never had this problem before, but I will watch out for it in the future.