hovokhc
By:
hovokhc

Q: How to move existing Magento store to Digitalocean.

August 22, 2015 621 views
One-Click Install Apps Deployment

How would i go about transferring my Magento store from Godaddy to Digital ocean?

1 Answer

In order to get your Magento store moved between hosts, you first need to backup your database using a command like:

mysqldump -h HOST -u USER -p DATABASENAME > FILENAME.sql

Then, tar archive your the files in your Magento directory with:

tar -czif ARCHIVENAME.tar.gz

Download this archive locally, then upload it to your DigitalOcean server, and unarchive

tar -xzif ARCHIVENAME.tar.gz

Next adjust your settings in the app/etc/local.xml file to match your new server

The section of the file you'll be adjusting looks like

<host><![CDATA[HOSTNAME]]></host><username><![CDATA[USER]]></username><password><![CDATA[PASSWORD]]></password><dbname><![CDATA[DATABASENAME]]></dbname>

Upload your MySQL backup to the new server, and then restore it with this command:

mysql -h HOST -u USER -p DATABASENAME < FILENAME.sql

The last step is to clear your Magento cache. Use Magento admin panel > System > Cache management or delete the contents of the var/cache and var/session folders in your Magento directory.

Have another answer? Share your knowledge.