Skip to main content

Create A New Project

We've created a starter kit that includes a lot of technical plumbing and defaults. To create a new project using this starter kit, navigate to the folder you'd like your project to be created in and enter the following into your terminal:

statamic new my-new-project schwartzmj/statamic-smj-starter-kit

After initializing your new project

Setup your .env file

  1. Run cp .env.example .env in your terminal to copy the example environment file over to a fresh .env file.
  2. Update the following variables within your new .env file.
    • APP_NAME — this is generally the "title" of the webpage
    • APP_URL — this should be the local URL for your development site (e.g. http://my-new-project.test)
    • AKISMET_API_KEY — If you do not have an Akismet API key, get one from the Akismet Development Portal
    • STATAMIC_CACHE_TAGS_ENABLED — set to false. Normally we cache resource-heavy rendering like the navigation tags. If you do not set this to false, you will not see updates to these templates without clearing your application cache.

Clean up

  1. Delete tailwind.config.js — we use tailwind.config.site.js and tailwind.config.cp.js instead
  2. Delete webpack.mix.js — we use Vite.
  3. Consider updating/deleting the contents of README.md

Dev server

  1. Run npm install to install Node dependencies.
  2. Run npm run dev to start the development server.
  3. On first page load, you will hit an error page. Simply follow the prompt to generate an application key and refresh the page.

Log In to the Control Panel

  1. Visit the /cp route. Credentials are:
    • user@example.com
    • password