If you're copying over a Magento mysql database over to your local computer or to a dev server then there are a few consistent things you need to update/change so that you don't screw anything up and get it to work properly. Here is a checklist that I use when building dev servers.
If there's anything I've missed please comment below and I'll add it in!
Note: This checklist is just meant to assist you, use your own judgment to be as safe as possible with production data. Also, we're assuming here that you aren't using a prefix for your Magento tables.
The Magento table core_config_data contains config data for each store in your Magento installation.
# Replace domain to example.dev UPDATE core_config_data SET value = REPLACE(value, 'example.com', 'example.dev') WHERE value LIKE '%example.com%';
# Ensure HTTPS doesn't ever happen: UPDATE core_config_data SET value = REPLACE(REPLACE(value, 'https://example.dev', 'http://example.dev'), 'https://www.example.dev', 'http://www.example.dev');
# IF YOU HAVE A WORDPRESS DB: Replace domain to example.dev for a wordpress installation if it exists. UPDATE wp_options SET option_value = REPLACE(option_value, 'example.com', 'example.dev') WHERE option_value LIKE '%example.com%';
# Apply ".dev" to the end of every email address. UPDATE `customer_entity` SET `email` = CONCAT(`email`, '.dev'); UPDATE `sales_flat_order` SET `customer_email` = CONCAT(`customer_email`, '.dev'); UPDATE `sales_flat_quote` SET `customer_email` = CONCAT(`customer_email`, '.dev'); COMMIT;