wiki:faq/domain/make-dev-site-live

Version 3 (modified by Jamie McClelland, 9 years ago) (diff)

--

How do I copy my Drupal dev site to my Drupal live site?

Many of us maintain two different Drupal web sites, one is the live site (in the faq I will refer to that site as www.example.org) and one is a development site (dev.example.org). The development site is used to test out new code or a new design before it is ready to go live.

At a certain point, when your dev site is ready to go live, you need to copy your dev site to your live. Once you are done, your live site will be identical to your dev site. And, you can now continuing developing your dev site for the next iteration of your site.

Below are directions for creating a script that will make a backup copy of your live site and copy the dev site to the live site. These direcitons assume a familariaty with ssh. By creating a script, you can easily build a process that can be repeated in the future.

You can create the script on your local computer and sftp the script to your server, or if you are comfortable with command line editors like nano or vim, you can create directly from a ssh session.

In this example, let's call the script: sync-dev-to-live. It should be placed in the home directory of the user that controls the live site.

The script is attached to the bottom of this page. Be sure to edit the variables at the top.

Attachments (1)

Download all attachments as: .zip