Edit on GitHub
Jump to docs navigation

Core development / Clone the Git Repository

Note: You are currently reading the documentation for Bolt 3.4. Looking for the documentation for Bolt 3.6 instead?

Warning: This method should only be used for doing work directly on the internal Bolt code base, and is not supported as a general installation option.

Installing Bolt directly from the Git repository requires both Git and Composer to be installed and working correctly. See this GitHub page for details on setting up Git, and the Composer Download page for instructions on obtaining and setting up an up-to-date copy of Composer.

Additionally, you need to decide if you want to use a stable branch (bug-fixing a stable or beta release), a feature branch for contributing a feature to the next Bolt minor release, or the bleeding-edge master branch which will become the next major version of Bolt.

At a high-level, the process is as follows:

  1. Clone the repository
  2. Checkout the required branch
  3. Install dependant packages via Composer

For example, the following would clone the Bolt repository automatically checking out the default branch, and installing dependant packages:

git clone git://github.com/bolt/bolt.git
cd bolt
composer install

Note: Bolt uses the current stable release branch as its default when cloning the repository.

For more information on core development, see the Bolt core development section of this documentation.

Choosing a Branch

Bolt uses a cascading branch-merge strategy, so that changes such as bug fixes made to the stable branch will cascade down to newer upcoming releases.

The overview of the branch layout is:

Branch Description
X.Y Stable (default) branch, e.g. 3.4
X.Z Beta release branch, usually one minor number higher than stable
3.x v3 feature branch
master Next major version development branch

Stable Branch

For a checkout of the current stable (default) branch, execute the following commands:

git clone git://github.com/bolt/bolt.git
cd bolt

3.x Feature Branch

For a checkout of the 3.x feature branch, execute the following commands:

git clone git://github.com/bolt/bolt.git
cd bolt
git checkout 3.x

4.x (master) Unstable Branch

For a checkout of the next-generation bleeding-edge 4.x development master branch, execute the following commands:

git clone git://github.com/bolt/bolt.git
cd bolt
git checkout master

Installing & Updating Dependencies

To install package dependencies on a fresh clone, run:

composer install

To update Bolt's dependencies to their latest supported minor releases, or when switching between branches, run:

composer update

Note: When changing branches it is generally advised to re-run composer update as some dependencies may be added in minor version, or be removed/replaced in major versions.

Next Steps

Example Themes

When a composer install or composer update is run, without a composer.lock present in the site root, Bolt will install the example themes from bolt/themes.

Note: These themes are required to run both unit & acceptance tests.

Should you require updated copies of these themes, they can be resynchronised with the copies in the vendor directory via the Nut setup:sync command.

Web server configuration

After extracting the tar file, you'll end up with a structure, containing the bolt files. These are the folders that contain all of the Bolt code, resources and other files. Unlike the other methods of installation, all of them are placed in the top level of the so-called web root. The created bolt/ folder where you've made the git checkout needs to be accessible in the browser.

To do this, configure your web server to use the bolt/ folder as the web root. For more information about this, see the pages on configuring Apache or Nginx.

If you bump into trouble setting this up, or you have no access to change your web server's configuration, read the page Troubleshooting 'outside of the webroot'.

Permissions

Generally most servers should be fine with the default permissions. However, if you require guidance on setting up permissions, see our File System Permissions page.

Finishing Set-up

After you've done this, skip to the section Setting up Bolt.

Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on IRC.