Skip to content

Instantly share code, notes, and snippets.

@ravixp
Last active October 17, 2017 09:50
Show Gist options
  • Select an option

  • Save ravixp/2c2a8bfb9fddde5e6d5442bb58ca1ba1 to your computer and use it in GitHub Desktop.

Select an option

Save ravixp/2c2a8bfb9fddde5e6d5442bb58ca1ba1 to your computer and use it in GitHub Desktop.
Magento 1 - Local/Staging to Live or Live to Local/Staging

Exporting SQL (Backup SQL) on old server

$ mysqldump -u database_name -p database_user > anyname_backup.sql

Importing SQL on new server

$ mysql -u database_user -p database_name < anyname_backup.sql

To Git Pull on a new server

$ git clone git@gitexample.git

Or tar the entire folder on old server

tar cpzvf filename.tgz ./* .htaccess --exclude="./var/cache/*" --exclude="./var/session/*" --exclude="./var/report/*"

Transfer Tar and SQL on new server

$ wget http://www.example.com/filename.sql

To Find/Edit User/Pass/db config file in local.xml

$  cd app/etc
$  vi local.xml

Press ESC to quit VI editor and type

$ :q!

Change the URL

myphpadmin > core_config_data

Clear the cache

$ rm -rf var/cache/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment