Skip to main content

Questions tagged [multi-environment]

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Multi-Environment Configs Failed on Craft cms 5

I am trying to implement [Multi-Environment Configs][1] on my Craft CMS 5. i've change my general.php to this. But i always got error {"name":"Not Found","message":"...
Amsal's user avatar
  • 1
0 votes
2 answers
14 views

How to deal with mismatched craft land plugin licence when staging in on a different domain

So i have a work flow likethis: local->staging->production local is my domain.test staging is subdomain.kitbox.com production is productiondomain.com How can i stop licence warnings or add test ...
joomkit's user avatar
  • 2,082
1 vote
1 answer
99 views

My secondary site keeps going back to the primary url after changing urls

I have a craft site that was in developement. the main site was linked just to an IP address the secondary site was linked to a url. Everything was working perfectly, I could see each site ...
rudtek's user avatar
  • 169
0 votes
1 answer
118 views

Craft version 4.x: multiple instances of Craft in same hosting account

This is related to me asking about multiple instances of Craft in same hosting account root 2 years ago, but that was for version 3.x, since when bootstrap.php is now part of the Craft infrastructure. ...
Jonathan Schofield's user avatar
1 vote
2 answers
364 views

Defining a domain for each site for both production and local - craft 4 multisite

I have a craft 4 multi site, each site has its own domain. In the cp settings for each site I have entered each domain. This works fine for the production environment but is obviously useless when ...
George Bleasdale's user avatar
2 votes
1 answer
89 views

Craft multi-site enable password protection

I have a multi-site Craft CMS set up with 6 sites. I am planning to live only 5 sites and I need to keep the 1 site in development phase. Also I want to enable fron-end password protection for the dev ...
JohnC's user avatar
  • 61
2 votes
1 answer
36 views

Multi user setting in a multi language environment

I am building a multi-language site in a multi-users environment. For each user I want to assign several text fields that should be translatable for each language, similarly like in entries/categories ...
LessMore Creative Studio's user avatar
0 votes
1 answer
119 views

All Plugins Showing "Not Installed" After Promoting Changes From Dev to Stage Environments

We are using the custom exec widget to move the codebase, backend fields, section creations, and images from one environment to another. We have Dev, Stage, and Production environments. After ...
ExterroMedia's user avatar
1 vote
1 answer
79 views

Craft Script: Environment variable GLOBAL_DB_DRIVER was neither 'mysql' nor 'pgsql'

I keep getting the error Environment variable GLOBAL_DB_DRIVER was neither 'mysql' nor 'pgsql'. Aborting. when trying to pull the database from the production server to staging using Craft Script. I ...
Lee's user avatar
  • 139
1 vote
1 answer
197 views

MySQL error when sync database using Craft Script from Craft Nitro

I'm trying to sync the database from staging to local (Craft Nitro) using the craft-script as per the article. Here is the error message, Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [...
Lee's user avatar
  • 139
2 votes
1 answer
45 views

How long to wait until license modal stops appearing?

I recently setup a pre-production environment of my fully purchased Craft site license, but Craft license management didn't think the sub-domain I was using was "dev-sounding" enough. Now ...
John's user avatar
  • 73
3 votes
1 answer
297 views

Does "preprod" count as a dev sounding sub-domain?

I would like to avoid the licensing error modal on a preproduction environment. Would preprod.random.domain work?
John's user avatar
  • 73
2 votes
1 answer
103 views

How to keep staging install synced with member registration

What is the best way to keep live and staging environments synced with member registrations? I can export/import the database from the live to staging environment to keep it in sync - and have a ...
Andrew's user avatar
  • 748
1 vote
1 answer
699 views

Multi Site Multi Domain

Probably this one is repeated, but I couldn't find an answer for it yet. I have a multi-site in Craft CMS 3.15, one that is in English and another one in Japanese. So the English page, which is the ...
Paloma Martinez's user avatar
3 votes
2 answers
115 views

Enironment Variable being rendered literal

OK, So created 2 variables in my local .env file ASSET_BASE_URL="https://mysite.local/resources" ASSET_BASE_PATH="/Volumes/yada/yada/yada/resources" Then in the CP, created a new ...
stuartmcd69's user avatar
1 vote
1 answer
353 views

How can I set an alias dynamically based on request?

I have a multi-domain setup where I run multiple one-pager sites from different domains. For development purposes, I have configured it to work like this: dev has: http://localhost/www.domain1.com ...
jishi's user avatar
  • 293
1 vote
1 answer
457 views

Assets (in assets folder) failing to load locally [Craft 2]

I'm trying to get my Craft 2 site running locally again (it worked at one point but now does not). I have gotten all the db related issues (seemingly) done and dusted and the admin loads fine, but it ...
J. Ktz's user avatar
  • 21
1 vote
4 answers
1k views

Less complicated local development w/Craft 3, is it possible?

I do not really care for WordPress, but one thing that it has going for is a dead simple local development environment. In fact, it free software called "Local". It took all of five minutes to get ...
4midori's user avatar
  • 668
1 vote
1 answer
959 views

Trouble updating Craft when allowAdminChanges is false

I've just updated a multi-environment site from Craft 3.3.5 to 3.4.5. Here's our config/general.php (irrelevant bits removed): return [ '*' => [ 'allowAdminChanges' => false, ...
plaintxt's user avatar
  • 488
0 votes
1 answer
628 views

Staging / Production w/ common DB and Assets

I'm hoping to implement staging and production installations for a larger scale Craft project I'm working on. My plan is to have the following structure: /staging.domain.com -- Complete Craft ...
Document Services's user avatar
1 vote
1 answer
67 views

4 Different HTML from single Craft 3 CMS on 4 different domains?

Can we serve 4 different HTML from single Craft 3 CMS on 4 different domains? working on a client project which has their 4 different domains for their different brands of the same business. Is it ...
Saikiran Sondarkar's user avatar
1 vote
1 answer
48 views

How to set Commerce 2 confirmation email in .env file?

We're just in the process of upgrading from Craft 2 with Commerce 1 to Craft 3 and Commerce 2. One of the issues we had before was that the client was getting confirmation emails for test orders. Is ...
Jay's user avatar
  • 1,042
2 votes
0 answers
132 views

How to reference domain specific asset path in multi domain multi env setup?

I have a site setup for Craft 3 like below .env variables for development local staging production Folder structure is standard. My assest volumes are like below. '@assetBaseUrl/documents/xx' '@...
joomkit's user avatar
  • 2,082
2 votes
1 answer
226 views

ImageOptimize not using image url specified in my multi-environment setup and my volume config

When I output my ImageOptimize field in the template, my images are not showing up. If you inspect the image url, it's missing a folder name I'm specifying as part of the url in my multi-environment ...
Dan Lee's user avatar
  • 1,107
2 votes
1 answer
272 views

Some (but not all) controller action routes return 404 on staging server

I've created a module for a project that has several actions, all of which are called through AJAX. Each is a post request that sends over any required params plus the CSRF token using the method ...
slander's user avatar
  • 73
2 votes
1 answer
515 views

Config for devMode not showing when true

I am using .env to set environment to local: # .ENV The environment Craft is currently running in ('dev', 'staging', 'production', etc.) CRAFTENV_CRAFT_ENVIRONMENT="local" My general config looks ...
joomkit's user avatar
  • 2,082
2 votes
2 answers
157 views

Uploading assets to different locations based on environment

I'm currently working on a new Craft CMS website for my company. We're using Elastic Beanstalk for hosting, which means that saving assets to file on the server isn't really viable- they get ...
Idgie's user avatar
  • 21
1 vote
1 answer
420 views

How to do multi-environment app config (config/app.php)?

I'm trying to setup different mail settings per environment. Here is my mail component that I'm defining in config/app.php: 'components' => [ 'mailer' => function() { // Get the ...
Bruce Johnson's user avatar
1 vote
1 answer
226 views

Multi environment-lite

Morning folks. First time doing multi-environment in Craft 3, and separate installations for staging and production is a bit overkill for this particular project. Instead I just want to show a few new ...
Ian Ebden's user avatar
  • 894
7 votes
1 answer
3k views

How to set up multi-env in Craft 3 with .env files?

How do I take advantage of the new .env files? I want to setup a local and production environment in Craft 3. Anyone know how to do this or know of any docs out there explaining it ?
Payton Burdette's user avatar
1 vote
1 answer
685 views

Multi-Environment Configs in CraftCMS 3

I am at the very early stages of using CractCMS but I'm keen to get off to the correct start, writing notes as I go along etc but I cannot figure this issue out. I have setup the Multi-Environment ...
Dan's user avatar
  • 121
1 vote
1 answer
2k views

Clarification how staging site works

We have a single installation of Craft that is live and with lots of users and lead generation going. Now the client would like to have a staging environment where we can prepare new pages, or add ...
Peter Lan's user avatar
1 vote
2 answers
354 views

phpdotenv with multi-lang Craft setup on MAMP

I inherited a Craft site which uses phpdotenv (which I'm unfamiliar with) and which I now have to make multi-lingual (https://craftcms.com/docs/localization-guide) with an added es and fr locale on ...
erwinheiser's user avatar
1 vote
1 answer
498 views

How to use license in different environments

We have a very simple development process, and I believe this process has messed up the license. app-client.local.mycompany.com.br => developer environment (intranet only) app-client.qa.mycompany....
Breno Mazieiro's user avatar
1 vote
1 answer
191 views

Is it possible to change one segment of the current url and keep the rest of it the same in a cleaner way?

How would you go about changing one segment of the current url? I have a select in the footer that you can click on a country name and then it redirects you to the homepage of that country version of ...
hcone5006's user avatar
5 votes
4 answers
326 views

What are the best practices for the development setup?

I've started with Craft developing all locally. The struggle for me when working locally was synchronizing the database and the backend assets with coworkers on the same project. In the last project ...
Marco Schuler's user avatar
2 votes
1 answer
698 views

Structuring site with multiple subsites

I have to make a website that has a single craft installation and one database. Now the site is for a company that owns several garages which should have their own subsite on a subdomain. It should ...
Mosh's user avatar
  • 153
3 votes
1 answer
2k views

Craft 3: Environment variables are not parsed when used in Assets source field

I'm using Craft 3 and I have 2 Sites setup. In my config/general.php file I have: return [ '*' => [ 'environmentVariables' => [ 'baseAssetsUrl' => '//'.strtolower($...
Sean Delaney's user avatar
1 vote
1 answer
495 views

Local vs Amazon S3 asset paths in multi-environment config

I'm looking to pull assets from a local folder when developing locally, and an S3 folder when on staging/production. Is this possible? It looks like no, but I'm hoping that's not the definitive ...
hisnameisjimmy's user avatar
2 votes
2 answers
557 views

What is the most adviceable way to combine a staging and live database?

Scenario: Live server where customer adds content and articles, which are store in the database Staging server where we add new functionality, fields, sections and more When the development of the ...
haabe's user avatar
  • 113
1 vote
1 answer
115 views

Can I get the value of an environment variable in routes.php (or other config files)?

I am trying to get the value of an environment variable (defined in the general.php config file) in the routes.php config file. Is it possible or not? I tried $environmentVariables = craft()->...
benface's user avatar
  • 226
2 votes
1 answer
674 views

Why is Craft extremely slow when using a shared, external database?

Every now and then I work in developer teams where we all use our local development environment to work on the code, but share the same database on a remote server (like discussed here etc.). Most of ...
medoingthings's user avatar
2 votes
1 answer
99 views

Multiple localhost config settings

Me and my coworker work on the same Craft project. We work locally with MAMP but access the database online, which works fine. For the assets I'd like to define separate localhost basepaths, since ...
Marco Schuler's user avatar
2 votes
1 answer
153 views

Production siteUrl being used in staging environment

I'm using the following multi-env config. My dev config works as expected. However, when I visit my staging site, it is setting the siteUrl to the production Url <?php // Dev URL $...
Matt's user avatar
  • 339
0 votes
0 answers
85 views

https problem with multi environment config

I'm using Craft-Multi-Environment on a clients site and have it all working happily with standard http. However, we want the site to run on https to be more secure, but the server company can't seem ...
mention79's user avatar
  • 543
1 vote
0 answers
578 views

Creating a Dev Environment

I've built a site using Craft, and now, I'd like to be able to create a mirrored development environment. With that, I'd like to be able to make changes and edits to the website that can then be ...
Jesse Winton's user avatar
1 vote
1 answer
175 views

With two EC2 Craft instances, the Control Panel session keeps expiring

Things were fine (no session logout for admin from CP) when there was only one EC2 instance for our website. I created a replica of the existing EC2 instance and now when I go to Control Panel, ...
Ankit Sahu's user avatar
2 votes
1 answer
337 views

Can entries be disabled by default for 2/3 of the languages on my website

I have a 3 language website that I made for a client. The website is in Dutch, Japanese and English. When my clients creates a new entry, most of the time they want to have the Japanese and English ...
Branko's user avatar
  • 497
0 votes
1 answer
1k views

Define a dynamic 'basePath' environmental variable without the locale

So in my general config file I've defined an environmental variable called basePath (as per the Environment-Specific Variables documentation). I'm using the getcwd() function to get the working ...
Mark Notton's user avatar
  • 2,347
1 vote
1 answer
248 views

multi-domain setup: template entry.url includes index.php

.htaccess is working fine. If I manually type url.com/about it shows the page. If I manually type url.com/asdf it shows 404 template page. url.com/index.php/testPathInfo shows success general.php ...
Amanda Lutz's user avatar