Skip to content

Commit ae6f727

Browse files
committed
docs: add "Adding Environments"
1 parent c5739f0 commit ae6f727

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

user_guide_src/source/general/environments.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ In addition to affecting some basic framework behavior (see the next
108108
section), you may use this constant in your own development to
109109
differentiate between which environment you are running in.
110110

111+
*******************
112+
Adding Environments
113+
*******************
114+
115+
To add custom environments, you just need to add boot files for them.
116+
111117
Boot Files
112-
----------
118+
==========
113119

114120
CodeIgniter requires that a PHP script matching the environment's name is located
115121
under **APPPATH/Config/Boot**. These files can contain any customizations that
@@ -122,6 +128,12 @@ a fresh install:
122128
* production.php
123129
* testing.php
124130

131+
For example, if you want to add ``staging`` environment for staging, all you need
132+
to do is:
133+
134+
1. copy **APPPATH/Config/Boot/production.php** to **staging.php**.
135+
2. customize settings in **staging.php** if you want.
136+
125137
*************************************
126138
Effects on Default Framework Behavior
127139
*************************************

0 commit comments

Comments
 (0)