Skip to content

Usage Importing a preexisting Drupal site

rgeleta edited this page Dec 25, 2014 · 3 revisions

I wanted to take a site that I was doing local dev on in a traditional lamp stack and move it to kalastack. This may have been self evident to some, but it wasn't to me so hopefully it helps somebody.

Setting up a "blank" site

Follow the instructions in Adding a new Drupal site to create an initial site.

This will set up your vhosts and db credentials but you will still need to grab your sites code, database and file assets.

On Kalabox this all is also achieved by using the GREEN add icon on the dashboard.

Import code

Using Git

From inside kalastack

cd /var/www
rm -rf playbox
git clone git@github.com:kalamuna/playbox.git playbox

You will want to replace git@github.com:kalamuna/playbox.git with your repo.

Using NFS shares

Kalastack shares code on your host, usually at $HOME/kalabox/www which is usually ~/kalabox/www on a Mac. If you don't plan on using version control you can directly put your code in here. You will likely want to remove the files that are already there first.

Import your database

You will want to grab a SQL dump of your database such as this one and import it into your MySQL database. This is easily done through the phymyadmin GUI by going to http://php.kala. You will see a database called playbox_kala. You will want to remove everything in it but take care not to delete the actual database. You can then do an import with your archive using the tab of the same name.

if you run into issues with upload size, edit /etc/nginx/sites-available/phpmyadmin

Import your static files

Download an archive of the files of your sites/default/files directory such as this one.

Extract that archive into your NFS share on your host machine at $HOME/kalabox/www/playbox/sites/default/files.

Update your host's hosts file

Remember that Kalastack does not update your host computer's hosts file. See Updating your host computer's hosts file

Check out your awesome vagrant based local dev site

Go to http://playbox.kala/ and voila