Moving Magento from server to server – Archive files too large

The question:

As my e-stores are too big to zip and download everything, I want to know what folders I should download from the old server and move to the new Magento installation, in order to get it quickly up and running?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

Generally speaking the only thing that gets really large on Magento is the media folder. The rest you can transfer easily by creating either a ZIP or TAR on the server.

In case you have access to SSH you can use the following command to create a TAR excluding the media and var directory.

tar -czf ./backup.tar --exclude=./media --exclude=./var ./

But if you’re moving the database (with products etc) also you’ll need the media directory as well as it contains the product images.

To transfer everything from one server to the other you can use the following if you have SSH access on both servers

scp -r -p /path/to/current/installation @[serveraddress]:/path/to/destination

Method 2

I prefer to use rsync to do transfers

rsync -avz -e ssh /path/to/local/ [email protected]:/path/to/new/

I would also exclude if you don’t want to copy all the extra cache files.

You can hit this command more than once and it will only copy new items the second time!

The last thing is to move the DB: I normally do a dump and restore then update your core_config_data table


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment