Manual Setup

This is the best way to install butik, if you already got an existing project running.

Follow those instructions step by step to set everything up.

Check out our starter kit to get you started as fast as possible

Set up your .env file


SQLite as Database

With this setup, we will use SQLite as a file-based database. It's important to activate the foreign keys as shown above.

More information: Laravel documentation.

MySQL as Database

If you prefer using MySQL, feel free to do so. A default setup might look similar to this example:


More information: Laravel documentation.

Publish assets

During installation, all needed assets will be published.

We would recommend publishing the view files manually.

Install the package

Require the butik package via composer

composer require jonassiewertsen/statamic-butik

PHP Fatal error: Allowed memory size of 1610612736 bytes exhauste ?

It may happen that the allowed memory for composer is exhausted. This command does bypass the memory limit for this command.

COMPOSER_MEMORY_LIMIT=-1 composer require jonassiewertsen/statamic-butik

Run the butik setup command

This script will migrate your database and set up some default values. Everything can be customized to a later point, but it will get you started as fast as possible.

php please butik:setup

Define default country

You need to define your default country in your config file.

This country will be the default country, as long as the user does not choose another country to ship to. This is important when deciding to ship exclusively to one country or to several countries.

Set up Redis queues

A Redis queue driver will give your page a speed boost, especially with sending e-mails.

Butik does work with the default Laravel/Statamic setup. You don't need to set it up, we do recommend it though.

The short and incomplete version, on how to set it up:

  • Add in your .env file QUEUE_DRIVER=redis

  • Install predis via composer composer require predis/predis

The complete documentation

Set up e-mails

Let me remind you to set up your e-mail settings inside the statamic env file.

Send yourself a test mail via the Statamic control panel to check if they are working correctly.

Statamic email configuration documentation


Congratulations. Your basic setup is finished.