How to Install Bolt on XAMPP on Windows

Written by
(Last Modified: 19 January 2017)

Bolt Logo

Requirements for this tutorial:

  • Basic knowledge / familiarity with XAMPP and phpMyAdmin interfaces

Download Bolt

  1. Download Bolt's latest version's .zip or .tar.gz from Bolt's download page.

The Bolt Site's Files

  1. Create new folder for the Bolt site under your XAMPP folder (it is usually located on C:\xampp\htdocs\). For this tutorial, we will use 'example' as the name. You can change it to your preferred name.
  2. Extract the Bolt's .zip or tar.gz file you have downloaded on step 1 to our new folder /example/.
    The structures of the fresh Bolt installation will be: (as of version 3.0.1)

    • /app/
    • /extensions/
    • /vendor/
    • /public/
    • .bolt.yml
    • .gitignore
    • composer.json.dist
    • composer.lock.dist
    • README.md

    - Folder /app/ is where the caches, config files, and database (SQLite) reside
    - Folder /extensions/ is self-explanatory. It's where the extensions files will be.
    - Folder /vendor/ is where the supporting files that Bolt use are
    - Folder /public/ is where your site's necessary files are, such as the theme and images. This folder is also where your site will be displayed (http://localhost/example/public)

Choose Database Engine for Bolt Site

  1. Choose which database engine you want to use.
    • Bolt use SQLite as default database. If you are fine by using SQLite, you can skip the section 'Setup Bolt Site to Use MySQL Database' below and go directly to step 9.
    • If you want to use MySQL, go to step 5.

    If you want to know more about the differences of MySQL and SQLite, check out this comparison table of MySQL and SQLite on Rapid Programming site.

Setup Bolt Site to Use MySQL Database

  1. Create new database on phpMyAdmin (http://localhost/phpmyadmin/). Let's use database name 'exampledb' for this tutorial. You can change it to your preferred name.
  2. Let's create new user for the database. Click our newly created database. Click 'Privileges' menu on the top bar. Add new user. We will use 'username' as User name, chose 'Local' as Host, and 'password' as Password. Chose to grant all privileges for the new user by checking the option 'Grant all privileges on database "exampledb"'.
  3. Visit the path to your Bolt site (http://localhost/example/public) to make Bolt generate the config file (config.yml). You will see form to create new user on http://localhost/example/public, don't fill it just yet. We just want to make Bolt generate the config file.
  4. Now we will edit the Bolt's configuration file - config.yml (it's in /app/config/config.yml).
    The default database setting is:

    database:
        driver: sqlite
        databasename: bolt
    

    Change it to:

    database:
        driver: mysql
        username: username
        password: password
        databasename: exampledb
    

Setup The Bolt Site - Create First User

  1. Visit the path to your Bolt site: http://localhost/example/public. If you use MySQL and have setup the database (Step 5-8), make sure to reload the page http://localhost/example/public again.
  2. As there is no user yet, you will be asked to create a user. This user will act as an admin. There are fields for username, password, email, and display name. Entered it with the info you like. Click 'Create the first user' button.
  3. Finish! You are now able to access the admin pages and your new bolt site.
Written by Dhyayi Warapsari
13 June 2016 (Last Modified: 19 January 2017)
Category: , , , ,
Tag: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *