Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Import a Drupal Site to Pantheon

Video loading...

  • 0:00
    Manage Drupal Sites with Pantheon Import a Drupal Site to Pantheon Addison Berry
  • 0:09
    OK, so now we're going to actually import
  • 0:11
    our Drupal site archive into Pantheon so we can create a new site
  • 0:16
    from our existing site.
  • 0:18
    So in this lesson, first, what we're going to do is we're going to actually take a look at the
  • 0:22
    Pantheon user interface option, so when you go to the Pantheon dashboard and you go to import,
  • 0:28
    you have a couple different ways that you can do that, so we're just going to
  • 0:32
    talk about what the various settings are and how that works and which one you probably
  • 0:35
    would like to use and then we're going to actually just go ahead and import the single file site archive
  • 0:40
    that we have created in a previous lesson, and we're going to get our site created.
  • 0:45
    So let's go have a look at that. So I'm back on my dashboard
  • 0:50
    and my account on Pantheon, and you can see I can create a new site, so we're going to go do that,
  • 0:56
    Give it a name. We're not doing organization stuff
  • 1:00
    so I'm just going to keep this as it is. And then we get to the same screen
  • 1:04
    that we've seen previously when creating one, and last time we chose start from scratch,
  • 1:07
    what we want to do is import archives instead of starting from scratch,
  • 1:11
    and our interface changes. So you notice that you get this simple field
  • 1:17
    here on this form to put in a URL, that is selected by default and
  • 1:23
    it's probably the most common way that people use the interface, and you see it has
  • 1:29
    an example here where you need to have a URL. Now you could just upload the file in the
  • 1:33
    actual user interface rather than having a URL; if I select file, then I would do that whole thing
  • 1:38
    where I choose the file and browse on my local machine and pick my tarball. OK?
  • 1:46
    So I could just do the file that way. Now, for this particular archive I could actually
  • 1:51
    do that because the archive is very small, it's only 23 megs, so it's under 100 megs
  • 1:57
    and it would be able to be uploaded. But many sites are not going to be
  • 2:01
    under 100 megs, and so, we're going to need to use the URL option.
  • 2:06
    The URL option is going to work through this interface here for anything that is up to
  • 2:12
    500 megabytes. So, depending on the size
  • 2:15
    of your archive, that's going to affect which of these options you can even pick
  • 2:21
    and, again, URL is the default; that's the most common method that
  • 2:25
    people would end up using. Now, this is for uploading a single file
  • 2:30
    site archive, like we created with Drush or Backup and Migrate where all of the
  • 2:35
    components are in 1 file. You can also provide the 3 separate archives,
  • 2:40
    so if I click on this click underneath here, now I get the form
  • 2:44
    with the 3 separated items, so I can do code, data base and files as
  • 2:49
    3 separate files. Again, notice it's defaulting to a URL
  • 2:53
    so if you want to just upload the file because you have small files
  • 2:57
    then you would change this so that you could browse for your file.
  • 3:00
    But this is how you do 3, so whether you have 1 archive with everything
  • 3:05
    or you have 3 separate archives, you can do it either way in this interface,
  • 3:08
    you just need to pick the right one. So I'm going to go back to single site archive
  • 3:12
    cause that's what we're going to be doing in this example.
  • 3:15
    Now, to use a URL I need to have a URL. I need to have my site archive file
  • 3:22
    somewhere on the internet. You can put it up on your web server,
  • 3:24
    it just needs to be like a publicly accessible URL.
  • 3:27
    I'm going to use Dropbox just because it's handy, it's easy and I'm going to use it.
  • 3:32
    So I'm going to go look at my file finder on my computer so that I can figure out
  • 3:38
    where my URL is in Dropbox. So this is my desktop, right?
  • 3:43
    And this is the archives I created. So I can't use that because this is actually
  • 3:48
    on my local machine, but what I did is I copied this tar.gz file into my Dropbox,
  • 3:54
    so you see that here, and now I can just grab the URL from this, so I'm going to
  • 3:59
    share the Dropbox link and that's going to copy the URL that I need and I'm going to go back
  • 4:03
    to the Pantheon site, and with this all I need to do is paste this in.
  • 4:09
    And we have one very, very important step when we are using Dropbox for the URL,
  • 4:15
    you'll notice at the end there is this dl=0. I want to change that to dl=1.
  • 4:20
    Zero would take someone to the Dropbox page, dl=1 is actually going to deliver the file
  • 4:28
    and that's what Pantheon needs, it doesn't need a web page, it actually needs the file.
  • 4:31
    So make sure you change that dl to 1 at the end there. And let's just import this.
  • 4:45
    Ta-daaa! And now if I go click on my Pantheon dashboard
  • 4:51
    it's going to take me to my new site.
  • 4:55
    And so you can see now I have a new dev sandbox set up for this new site
  • 5:01
    that I just imported with that archive and I can get going with my development.
  • 5:05
    I have all of my connection information and I can just get started with my site.
  • 5:11
    To recap what we did: we looked at the Pantheon UI import options, so when you go
  • 5:18
    to the Pantheon site, Create a new site, Import you have a couple different ways you can use
  • 5:22
    either the single file archive form or if you click the link underneath you can switch that
  • 5:27
    to the 3 separate files form, whichever one works for you based on the archive files
  • 5:33
    you have, and then we also talked about the difference between using a URL and
  • 5:38
    using the upload form directly in the UI and that is based on file size limits.
  • 5:44
    So you can only upload up to a 100 megs but you can use the URL up to a 500 MB file.
  • 5:49
    So after we looked at all of our UI options we chose to do a single file archive using a URL
  • 5:55
    and I used Dropbox and went ahead and imported my site and I'm ready to go.

Import a Drupal Site to Pantheon


Now that we have a site archive file, we need to get this imported into our Pantheon account. In this tutorial we will do just that. In the process we will look at the two different interfaces for doing an import. For our single-file site archive, we can use the default interface, but if you have three separate files for the database, code base, and files, we'll look at how to get those uploaded as well. If your site is too large to import using the Pantheon dashboard UI, then you should check out the instructions for Importing a Large Site on the Pantheon website.

Sponsored by Pantheon

Log in or sign up to download companion files.
Additional resources: