Skip to main content
⭐️ If you love EverShop, give it a star on GitHub. Thanks!

Installation guide

The following installation guides will guide you step-by-step to create a new EverShop project and get it started.

info

Please check this document for the system requirement list.

Using create-evershop-app command

Without MySQL database(The playAround mode)

You can get started with EverShop in minutes by running the following command:

npx create-evershop-app my-app --playAround

With the --playAround flag, you don't need to install MySQL database. A MySQL database will be provided to you in our cloud server. So you can get started with EverShop quickly.

warning

This database is only for testing purpose. It will be permanently deleted after 7 days. No backup is available. Please DO NOT insert any important data into this database. After 7 days, you will have to install your own MySQL database to continue using EverShop.

With MySQL database

If you already have a MySQL database, you can run the following command to get started with EverShop:

npx create-evershop-app my-app

Connect to MySQL server using SSL

By defaul EverShop supports password authentication (caching_sha2_password or native_mysql_native_password). If you want to connect to the MySQL server using SSL, you can add the following properties to the config/default.json file after the installation process:

  "system": {
"database": {
"host": "localhost",
"port": "3306",
"database": "evershop",
"user": "root",
"password": "123456",
"ssl": {
"ca": "path/to/ca.pem",
"cert": "path/to/client-cert.pem",
"key": "path/to/client-key.pem"
}
}
}

Install manually

Step 1: Install The @evershop/evershop Npm Package

@evershop/evershop is the core of the EverShop platform. It contains all of the core modules like catalog, checkout, order.

Install the @evershop/evershop Npm package
npm init;
npm install @evershop/evershop;

Step 2: Install The Core Npm Scripts

Open the package.json file and add the following scripts:

Add the core npm scripts
"scripts": {
"setup": "evershop install",
"build": "evershop build",
"start": "evershop start"
}

Step 3: Run the installation script

Before running this script, make sure that you have an empty database ready for EverShop.

info

Please check this document for the system requirement list.

This installation script will do the following tasks:

  • Create a default configuration file.
  • Create a MySQL schema.
  • Create your administrator user.
Installation script
npm run setup
caution

During the installation process, you will be asked for some information like database connection, your shop information…

Step 4: Folder permision

EverShop needs to write some files to the disk. So you need to make sure that the following folders have the write permission:

  • public/
  • .evershop
  • .log
  • media

Step 5: Run the build command to build the site

Build the site
npm run build

Step 6: Run the start command to start your store in production mode

Start the site
npm run start

Your site will start at http://localhost:3000.

Admin panel can be accessed at http://localhost:3000/admin.

Update EverShop

To update EverShop, you can run the following command:

Update EverShop
npm install @evershop/evershop@latest

EverShop will take care of the database migration for you.

note

Updating EverShop requires running the build command again.

For developer

If you are developer and want to start the project in the development mode. There are some extra steps

Adding the dev script

Open the package.json and add the following script:

Add the core dev script
"scripts": {
"setup": "evershop setup",
"build": "evershop build",
"start": "evershop start",
"dev": "evershop dev"
}

Start the project in development mode

Start the site in development mode
npm run dev

Adding jsconfig.json file

Open the jsconfig.json file and add the following content:

Add the jsconfig.json file
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@components/*": [
"./themes/<Your Theme Folder>/components/*",
"./node_modules/@evershop/evershop/src/components/*"
],
"@components-origin/*": [
"./node_modules/@evershop/evershop/src/components/*"
],
"@default-theme/*" : [
"./node_modules/@evershop/evershop/src/modules/*/pages/*"
]
}
}
}