This is referenced in the instructions for creating a new site and umbrella repository at https://github.com/INN/docs/blob/master/projects/largo/umbrella-create-new-repo.md and covers the creation of the new umbrella repository.
Using sitename.org
as an example, and providing full pathnames in front of command-line prompts to help keep you located:
-
When running
vv create
oryo wp
orwp config create; wp core install
, make notes of the answers you provide to the script. -
From the directory above the wordpress installation, run
ls
. You should see something that looks like this:In vvv:
/vagrant-local/www/sitename-org$ ls htdocs/ vvv-hosts vvv-init.sh wp-cli.yml
In Valet:
~/sites$ ls a-valet-site/ another-valet-site/
-
Clone this repository to someplace safe:
In vvv:
/vagrant-local/www/sitename-org$ git clone [email protected]:INN/umbrella-boilerplate.git /tmp/umbrella-boilerplate
In Valet:
~/sites$ git clone [email protected]:INN/umbrella-boilerplate.git /tmp/umbrella-boilerplate
-
Copy this repository's contents to your new site:
In vvv:
/vagrant-local/www/sitename-org$ rsync -rv --exclude=.git /tmp/umbrella-boilerplate/ htdocs/
In Valet:
~/sites$ mkdir sitename-org ~/sites$ rsync -rv --exclude=.git /tmp/umbrella-boilerplate/ sitename-org
-
Make sure that the contents were copied by comparing the new install and the umbrella repo's contents
In vvv:
/vagrant-local/www/sitename-org$ ls /tmp/umbrella-boilerplate /vagrant-local/www/sitename-org$ ls htdocs/
In Valet:
~/sites$ ls /tmp/umbrella-boilerplate ~/sites$ ls sitename-org
-
Now, initialize the submodules and do some other things.
In vvv:
/vagrant-local/www/sitename-org$ cd htdocs /vagrant-local/www/sitename-org/htdocs$ git init /vagrant-local/www/sitename-org/htdocs$ ./initialize.sh /vagrant-local/www/sitename-org/htdocs$ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: .git-ftp-ignore new file: .gitignore new file: .gitmodules new file: README.md new file: wp-content/themes/largo
In Valet:
~/sites$ cd sitename-org ~/sites/sitename-org$ git init ~/sites/sitename-org$ ./initialize.sh ~/sites/sitename-org$ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: .git-ftp-ignore new file: .gitignore new file: .gitmodules new file: README.md new file: wp-content/themes/largo
Note that that will remove the initialize.sh script and this README file.
-
Copy in the child theme, if necessary.
cd wp-content/themes/
git clone [email protected]:projectlargo/theme-c-hit.git c-hit
: note the second argument togit clone
specifying where to clone intorm -r c-hit/.git
: remove the .git directory from the child theme, making it no longer a git repository, but just a bunch of files- Edit the child theme's
style.css
hasTemplate: largo
and notTemplate: largo-dev
. Edit the file if necessary. If this changes, make note of this fact, because that may require change or updates to configuration options in the site's database. cd ../../
: go back to the root of the project
-
Edit files to reflect the appropriate variables for this installation:
README.md
- perform find-and-replace with domain name, but also check the instructions from thevv create
setup.gitignore
- see comment at bottom of file; you need to add the child theme's directory name here
-
Prepare to commit: use
git add
to add the child theme and any other files.- Note that the child theme is not a submodule in this setup - we are incorporating the files directly into the theme. If you don't see individual files within the child theme from the umbrella repository when you're running
git add
, something has gone wrong.
- Note that the child theme is not a submodule in this setup - we are incorporating the files directly into the theme. If you don't see individual files within the child theme from the umbrella repository when you're running
-
Commit:
git commit
This doesn't set any variables. This doesn't fill out any text. This just gets you the files.
If this repo is hosted on an account owned by INN, add client-hosting-manager as a submodule in wp-content/plugins/client-hosting-manager
, and add the required constants to the site's wp-config.php after deploying, but before activating.