This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Installing your first Drupal site
Theodoros Ploumis edited this page Jul 2, 2015
·
3 revisions
- On your local machine (host machine or simply host) go into the folder /sites.
- Download a Drupal project (eg using drush,
drush dl drupal
) on this folder. You can also clone a project from a git repo and generally you can put any Drupal project (including core files) here. - Rename this folder to a domain pattern folder (eg test.localdomain.dev). This will be the domain to access the site on localhost.
- On the parent folder (where Vagrantfile exist) run
vagrant up
to bring up the virtual machine (vm). - Run
vagrant provision
. In this step parrot will make its magic and create a vhost with the same domain as the folder of the project. - Create a new database on the vm using mysql cli or phpmyadmin. User is root, password is root too. You can also import an existing database to mysql using instructions from https://github.com/computerminds/parrot/wiki/Mysql-server#auto-database-import.
- Add the new local domain on your hosts file so host machine can access the site.
- Open the local domain with your browser and install Drupal site normally using the database you just created/entered.
Here is an example of the steps for an Ubuntu host.
cd sites
# current drupal 7.x version is 7.38
drush dl drupal
...
mv drupal-7.38 test.localdomain.dev
cd ../
vagrant up
...
vagrant provision
...
# login to guest mysql server
mysql -u root -proot -h 127.0.0.1 -P 3306
# Create the database
mysql> CREATE DATABASE `localdomain` CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> exit
# Edit /etc/hosts. Needs sudo if you are not root.
sudo echo '192.168.50.4 test.localdomain.dev' >> /etc/hosts