Questions tagged [environments]
The environments tag has no usage guidance.
22
questions
1
vote
0
answers
20
views
Merging production version into local environment
My live Craft site was built by another dev a while back just before I joined the company, at the time of launching it I had it setup locally with docker and the most recent site files. Since it has ...
0
votes
0
answers
174
views
Craft CMS + Docker Deployment Strategy
We are about to move to a new development and hosting environment (I am also new to Craft). Our planned development workflow is as follows: develop and test on a local craft cms docker container ...
1
vote
1
answer
144
views
email settings per environment not working
I'm trying to set this up changing config/app.php
with
'dev' => [
'components' => [
'mailer' => function () {
// Get the stored email settings
...
2
votes
1
answer
202
views
Serve remote files instead of local ones (with a nitro setup)
I'm new to CraftCMS and slowly learning how to use it. I'm creating a site. The local setup was done with Nitro. I have read about the ways to synchronize data and assets across environments. But I ...
1
vote
2
answers
235
views
Synching content and template files across environments
I'm new to CraftCMS and have a few basic questions about synching contents between local and remote development environments. This has been discussed in other posts by I'm looking for more specific ...
1
vote
0
answers
688
views
Using @webroot in templates returns a different path, can't override in config
I'd like to use @webroot in my templates using the {{ alias('@webroot') }} tag. However, when I do this it returns a longer path than what is returned when I use @webroot in the control panel.
For ...
1
vote
1
answer
388
views
Are there any benefits to using Yii's Aliases vs getenv?
As part of a refactor on our code base, we have been looking into our use of Yii 2's aliases and PHP's getenv function. Here's a code example:
Alias
<link rel="icon" sizes="96x96" type="image/png"...
1
vote
1
answer
603
views
Upgrade C2 to C3 Uncaught TypeError involving Dotenv
I am just trying to upgrade and get the following error message:
Fatal error: Uncaught TypeError: Argument 1 passed to Dotenv\Dotenv::__construct() must be an instance of Dotenv\Loader, string given ...
3
votes
4
answers
1k
views
Craft 3 - Recommended development environment for Windows?
I was wondering what people who are developing on Windows 10 are using as webserver environment in 2018? I have had ok results previously using ampps, but I'm having a lot of problems with Craft 3 as ...
1
vote
1
answer
1k
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 ...
4
votes
2
answers
2k
views
MAMP: Craft can’t connect to the database with the credentials in craft/config/db.php
I'm using MAMP to setup a local environment for CraftCMS on Windows 10.
I have followed all necessary procedures and have my local host and my database setup but I'm still receiving the error ...
3
votes
1
answer
581
views
500 Error with no details on site migration
I'm trying to migrate my site from a PHP5.6 host to a PHP 7 host in preparation for Craft 3.
I've copied everything across and am trying to load an exact copy of the production site on a different ...
2
votes
1
answer
655
views
How do I configure multiple environments for console commands?
I have built a plugin with some console commands for automating some regular tasks that will be run by a cron job for my site.
In order to get the commands working, I had to replicate my database ...
2
votes
1
answer
404
views
devMode, phpdotenv variable ignored
I'm using dotphpenv for environment specific config.
This works perfectly for my db config. I added another 2 environment vars for devMode and allowAutoUpdates
DEV_MODE=false
AUTO_UPDATE=false
and ...
1
vote
1
answer
1k
views
Using a virtual host result in internal error
I'm trying to setup a virtual host to access my craft project through ontherocks.dev, without any success yet.
www.ontherocks.dev : correct response
www.ontherocks.dev/admin : Apache 404
www....
0
votes
1
answer
133
views
Multi-environment config issue
I'm trying to set up Craft and on deployment to a staging server am getting the following error message:
An exception has been thrown during the rendering of a template
("Craft can't connect to ...
6
votes
7
answers
4k
views
Running Craft with Docker (or something similar)
Has anyone had success with setting up Craft using Docker?
I've stumbled across some Dockerfiles for WordPress and other CMS's but couldn't find much in the way of Craft. I'll be exploring this a bit ...
1
vote
1
answer
1k
views
Craft directory 403 Access Forbidden with XAMPP
I've been using xampp for a long time and have never encountered a 403 error. I have many projects in my xampp/htdocs/ folder, none of them have ever had any problems until now. I have the craft files ...
2
votes
1
answer
961
views
Is using craft.config to access siteUrl possible?
In the past I would comment out analytics code on my dev and staging sites then uncomment the code when it went live. I ran across this page in the Craft docs the other day and started thinking, can I ...
5
votes
8
answers
2k
views
Multi-environment database config being ignored
The 'localhost' array is not being recognized. If I add :3307 to the '*' array's server attribute, it works. Here's the contents of my db.php:
return array(
'*' => array(
'server' => '...
34
votes
3
answers
3k
views
What's the best practice for upgrading a versioned Craft site?
It's thrilling to click The Button and watch Craft update itself. I take advantage of multi-site configurations with every deploy, and my practice thus far is to...
Upgrade Craft in production.
...
104
votes
8
answers
15k
views
What's the best practice for handling data migration and organization across development environments?
This issue becomes especially difficult when there are multiple environments, with multiple developers working on different features that affect the data structure.
The holy grail is a git-style ...