I have some patches I'd like to test on a development server dev.example.com.

I plan to take a copy of the files, install them in the web folder for dev.example.com, create a new database, and do a find and replace in the SQL export replacing www.example.com with dev.example.com, and import this into the new database, and alter the local configuration files with the new database connection settings.

Can it be this simple?


1 Answer 1


Basically, the way I did it was to install Virtualbox, install a Linux VM with Apache, PHP and MySQL configured reasonably close to the running environment.

Pulling the live site off involves creating a tarball of everything in the htdoc directory except the image cache, Magento cache, sessions and a compressed mysqldump.

If you get fancy, you can do it with rsync.

Shut the apache server and cron job down, untar the htdoc directory, import the mysqldump, run a script to set file ownership and permissions to match your http server's running needs, import a sql script that changes the base URLs, resets email addresses to your dev address, turns on/off various settings for modules you don't want sending emails, updating external services. Copy over your server specific app/etc/local.xml.

At that point start the http server and cron and you should be live.

If you're proficient with shell scripting, it's all pretty much automatic, not a lot of fiddling. And you're either running Linux in Windows or Linux in Mac for a nice all-around work environment.

  • OK: I forgot to add; I'm completely unfamiliar with the Linux command line.
    – Steve
    Nov 25, 2015 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.