Giter VIP home page Giter VIP logo

mage-db-import's Introduction

So, you wanna magento dev db, huh?

Well today is your lucky day buddy. Us folks at http://www.getbrandid.com/ are sharing the script we use to automatically create a dev db from a prod db, including all the tweaks you need to set things up PROPERLY.


It's easy!

  • Download your prod.sql to the folder above this file

e.g. if your magento root is /var/www/magento, then put it in /var/www/prod.sql

  • clone this repo in the same dir

git clone [email protected]:arush/mage-db import

  • change your URLs, mailchimp API keys and choose which modules you want to modify in:

scripts/live-to-dev.sql

  • change your db name in these two:

scripts/createdb.sql

import

  • change your magento root path in:

import

  • Now you're ready to rock and roll, so cd into the repo dir

cd magento-db-import #or whatever

  • execute the script

./import

It will ask you your myqsql password three times, and in a few seconds, you'll be able to visit your dev site with a brand new db.

Basic things
  • disables cache
  • hides site from robots (noindex,nofollow)
  • changes Magento URLs
  • changes Magento cookie domain
  • changes all customer emails so you don't accidentally email them
  • changes order increment ID so simpler payment gateways don't get confused dealing with the same order IDs as your live site
  • changes magento newsletter subscriber emails
Cool things
  • turns Google Analytics and lots of other analytics services off (kissmetrics, mixpanel, chartbeat)
  • turns Olark Livechat off
  • changes Mailchimp API keys
  • changes Sweettooth rewardsref personal url
  • turns Onepica ImageCDN off
To Do (please help!)
  1. automate the password steps, so you don't have to enter mysql password 3 times
  2. prompt the user for dbname, url and magento root so you don't have to edit the files

mage-db-import's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

luisgcastillos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.