Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

Here's some more info:

The local (testing) site works perfectly

The following plugins are installed: Comprehensive Google Map Plugin, jQuery Colorbox, Open external links in a new window, Post Types Order, Redirection, Use Google Libraries, WordPress Mobile Pack, WordPress SEO, WP-Migrate-DB, WP Super Cache (caching is currently turned off).

The testing sever uses WAMP on Windows 7

The testing server version is version-controlled using Git

The production server runs on GoDaddy Linux hosting

Files are being transferred via SFTP on WinSCP

I also tried regular FTP using FileZilla

share|improve this question
    
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. –  user16935 Jun 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. –  user16935 Jun 10 '12 at 16:30
    
By import file, I mean the .sql file. –  user16935 Jun 10 '12 at 16:30
    
In case you become a regular user and come back to visit this site: please answer your own question and mark it as the correct one, thanks! –  brasofilo Jun 10 '12 at 23:03
add comment

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.

share|improve this answer
add comment

Instead of exporting the database why don't you try to export an xml file from wordpress itself.

1) Go to Tools > Export and download the xml file.

2) setup a fresh wordpress install on your website.

3) Install the import plugin and go to Tools > Import.

4) if there are media files that cannot be uploaded from your localhost, try copying the uploads folder in wp-content directory in your new wordpress installation online.

share|improve this answer
    
Thanks. I just attempted this, but the xml file ends abruptly 53 lines in. I'm guessing the installation is corrupted? –  user16935 Jun 10 '12 at 15:52
    
Oops...I accidentally exported from the remote site there (meaning the migration broke the site more than I had suspected). Let me try exporting from the testing server. –  user16935 Jun 10 '12 at 16:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.