2

So I've created a boilerplate for my web development company using Craft. However, I'm encountering so much inconsistency across different machines.

I recently set up a new website at my public domain. I set up the webserver, and did a Git pull from the boilerplate Bitbucket I've got going.

After the pull, I did a composer install and installed Craft.

At this point the website is working, but I can't login. The Craft setup never prompted me to create a new user/password. Not sure why.

Regardless of this issue, I have to import my DB from my local box to the web server. So after doing so, I can now login. Great right? Not quite.

After I login, I can't access any Settings in the backend and get a error about my license key. I've since fiddled around with my License Key settings on Craft's website, but I still can't access the Settings panels.

I'm sure there's a process to deploying a site to production, but so far I can't find any consistency. Any advice is greatly appreciated.

Screenshot below.

Dashboard View

2

In your general.php for a production site you'll probably see "allowAdminChanges" set to false. This is not an inconsistency, this is how it is supposed to work. Every change you make on your local development will be added to a project config file ( yaml file in your config folder ) and fields / sections / settings you create locally will then automatically be synced into your staging or production environment, the reason admin changes aren't allowed by default in there is simple, if you make changes in many places, the project.yaml file will be inconsistent and you'll run into a lot of issues trying to sync your install across different environments.

  • This was it. Thank you for explaining it. What exactly triggers the switch from dev, staging, or production? – Palmtree Studios Mar 24 at 6:09
  • It looks like the "ENVIRONMENT" variable, if not defined, automatically assumes as production. The generated .env file on setup did not create this variable, so it deferred to the default state. Makes sense, just one of those things that's easy to miss. – Palmtree Studios Mar 24 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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