Preserve theme settings when migrating from local to live

I will suggest not to replace the data directly in the sql file. This is because wordpress stores data in terms of serialized manner. The reason for simply replacing data in serialized form leading to problems is that serialized data saves string length with it, so if you replace strings the length most likely will differ.

The search-and-replace-tool takes this into account and saves the new string length. In this case you first create the database and import the sql file. Then use this script to make a search and replace directly in the database.