1

I installed craft cms 5 and got ``HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException```error. This is my .env configuration. How to fix this

# Read about configuration, here:
# https://craftcms.com/docs/5.x/configure.html

# The application ID used to to uniquely store session and cache data, mutex locks, and more
CRAFT_APP_ID=CraftCMS--····································

# The environment Craft is currently running in (dev, staging, production, etc.)
CRAFT_ENVIRONMENT=dev

# Database connection settings
CRAFT_DB_DRIVER=mysql
CRAFT_DB_SERVER=127.0.0.1
CRAFT_DB_PORT=3306
CRAFT_DB_DATABASE=yardstick
CRAFT_DB_USER=root
CRAFT_DB_PASSWORD=
CRAFT_DB_SCHEMA=public
CRAFT_DB_TABLE_PREFIX=

# General settings
CRAFT_SECURITY_KEY=································
CRAFT_DEV_MODE=true
CRAFT_ALLOW_ADMIN_CHANGES=true
CRAFT_DISALLOW_ROBOTS=true

PRIMARY_SITE_URL=http://yardstick.dev.com
ASSET_BASE_URL=http://yardstick.dev.com/uploads
ASSET_BASE_PATH=uploads``

1 Answer 1

2

Usually you see this error when Craft CMS is not installed yet or the credentials to the database are not correct. You can run the Installer from the command line via ./craft install or by going to http://yardstick.dev.com/admin.

On another note, I can highly recommend to run local Craft CMS setups with ddev. It will make a lot of things easier for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.