Magento – How to Move from Production to Development

development

I've been asking by a friend to develop his Magento site. His site is already up and running. And he is going to give me the access to the server that hosting his Magento site.

In order to develop some new features, I need to somehow clone his running Magento to a development environment.

Usually, I hosted all my Magento instance on Amazon AWS and I'll just clone the instance and then launch another instance for development. Its easy to do it in AWS…

Anyone have any guidelines here that can help me? Maybe some blog teaching me how to clone an running Magento into a development environment?

thank you guys. Here Let me make the case more clear:

  • Is the code under version control?
    — no
  • Has the Magento site any modifications?
    — Maybe
  • Does it use third-party modules?
    — Pretty sure it does,
  • Do you know how to create a database backup?
    — I have full access to the db and certainly I can create a backup.

Best Answer

  1. Create and download a gzip of everything in the directory that the Magento site is in.
  2. Do a dump of the entire database. (if you have phpmyadmin, click the Magento database name on the left, then click Export on the top menu, then click "Go")
  3. Upload and extract the gzip on your development server, in the directory you are using for Magento (usually web root, unless you have multiple sites).
  4. Create a database on the development server, and import the sql export from step 2.
  5. Edit app/etc/local.xml - change the database name, user, and password to match your new db.
  6. In the new db, go to the core_config_data table, and change the web/unsecure/base_url and web/secure/base_url to the url of your development server (including any subfolders Magento might be in). Don't forget a forward slash at the end of the url.
  7. Delete cache and session in the var folder on your dev server.

After that, you should be able to navigate to the site at your dev server url. The admin path (devserver.com/admin, for example) will be the same as on the old server. Your file / folder permissions will need to be set as well - you can find info on that here : http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html

Related Topic