How To Migrate Magento From Development To Production Servers
Migrating Magento from Development (Staging) to Production (Live) is a challenging tasks especially if you haven’t done it before. Learn the painless Magento migration from Development to Production servers.
For moving magento from development to live server you need to upload your magento directory to live server and then change the db configuration from “app/etc/local.xml” to connect to the live database.
Step 1: Take a backup of entire Magento database as .sql file. So, for an example your development site is located at http://devsite.com/ and your live site is located at http://livesite.com.
Step 2: Open the backup file you created at step 1 and do Search/Replace all from “devsite.com” to “livesite.com”.
Magento stores complete url paths inside the database. Therefore you’ll end up with database full of url paths. If you try to import the file with changes done as above then it may not imported & shows some foreign key issue. To fix Magento foreign key issues at import you have to do the followings:
Place following lines of SQL commands on the top of the .sql file
1 2 3 4 5 6 7 8 | |
Now, place following lines of SQL commands at the end of the .sql file
1 2 3 4 5 6 7 | |
Finally, save the .sql file & import it into the live DB & you are done. I hope this will help you migrate Magento from development to production. Please leave us a comment and let us know if you run into any trouble migrating your Magento store from development to Production.