Skip to content

Commit 4df89ed

Browse files
authored
Merge pull request #6324 from kenjis/fix-docs-installation
docs: improve installation
2 parents 6e0ed39 + 9974df1 commit 4df89ed

File tree

3 files changed

+42
-21
lines changed

3 files changed

+42
-21
lines changed

user_guide_src/source/installation/installing_composer.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Composer Installation
77

88
Composer can be used in several ways to install CodeIgniter4 on your system.
99

10-
The first two techniques describe creating a skeleton project
10+
The first technique describes creating a skeleton project
1111
using CodeIgniter4, that you would then use as the base for a new webapp.
12-
The third technique described below lets you add CodeIgniter4 to an existing
12+
The second technique described below lets you add CodeIgniter4 to an existing
1313
webapp,
1414

1515
.. note:: If you are using a Git repository to store your code, or for
@@ -27,8 +27,8 @@ the latest released version of the framework.
2727
This installation technique would suit a developer who wishes to start
2828
a new CodeIgniter4 based project.
2929

30-
Installation & Set Up
31-
---------------------
30+
Installation
31+
------------
3232

3333
In the folder above your project root::
3434

@@ -52,7 +52,11 @@ A sample such installation command, using the default project-root "appstarter":
5252

5353
> composer create-project codeigniter4/appstarter --no-dev
5454

55-
After installation you should follow the steps in the "Upgrading" section.
55+
Initial Configuration
56+
---------------------
57+
58+
After installation, a few initial configurations are required.
59+
See :ref:`initial-configuration` for the details.
5660

5761
.. _app-starter-upgrading:
5862

@@ -126,6 +130,9 @@ The same `CodeIgniter 4 framework <https://github.com/codeigniter4/framework>`_
126130
repository described in "Manual Installation" can also be added to an
127131
existing project using Composer.
128132

133+
Installation
134+
------------
135+
129136
Develop your app inside the ``app`` folder, and the ``public`` folder
130137
will be your document root.
131138

@@ -136,8 +143,8 @@ In your project root::
136143
As with the earlier two composer install methods, you can omit installing
137144
phpunit and its dependencies by adding the ``--no-dev`` argument to the ``composer require`` command.
138145

139-
Set Up
140-
------
146+
Setting Up
147+
----------
141148

142149
Copy the ``app``, ``public``, and ``writable`` folders from ``vendor/codeigniter4/framework``
143150
to your project root
@@ -148,6 +155,12 @@ Copy the ``env``, ``phpunit.xml.dist`` and ``spark`` files, from
148155
You will have to adjust the system path to refer to the vendor one, e.g., ``ROOTPATH . '/vendor/codeigniter4/framework/system'``,
149156
- the ``$systemDirectory`` variable in **app/Config/Paths.php**
150157

158+
Initial Configuration
159+
---------------------
160+
161+
A few initial configurations are required.
162+
See :ref:`initial-configuration` for the details.
163+
151164
.. _adding-codeigniter4-upgrading:
152165

153166
Upgrading

user_guide_src/source/installation/installing_manual.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,33 @@ and extract it to become your project root.
2626
The symbols that can be used are ``/``, ``_``, ``.``, ``:``, ``\`` and space.
2727
So if you install CodeIgniter under the folder that contains the special characters like ``(``, ``)``, etc., CodeIgniter won't work.
2828

29-
Setting Up
30-
----------
29+
Initial Configuration
30+
=====================
3131

32-
None
32+
After installation, a few initial configurations are required.
33+
See :ref:`initial-configuration` for the detail.
3334

3435
.. _installing-manual-upgrading:
3536

3637
Upgrading
37-
---------
38+
=========
3839

3940
Download a new copy of the framework, and then replace the ``system`` folder.
4041

4142
Read the :doc:`upgrade instructions <upgrading>`, and check Breaking Changes and Enhancements.
4243

4344
Pros
44-
----
45+
====
4546

4647
Download and run
4748

4849
Cons
49-
----
50+
====
5051

5152
You are responsible for merge conflicts when updating
5253

5354
Structure
54-
---------
55+
=========
5556

5657
Folders in your project after set up:
5758
app, public, system, writable

user_guide_src/source/installation/running.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,31 @@ This section addresses how to use each technique, and explains some of the pros
1212
If you're new to CodeIgniter, please read the :doc:`Getting Started </intro/index>`
1313
section of the User Guide to begin learning how to build dynamic PHP applications. Enjoy!
1414

15-
Initial Configuration & Set Up
16-
==============================
15+
.. _initial-configuration:
16+
17+
Initial Configuration
18+
=====================
1719

1820
#. Open the **app/Config/App.php** file with a text editor and
19-
set your base URL. If you need more flexibility, the baseURL may
21+
set your base URL to ``$baseURL``. If you need more flexibility, the baseURL may
2022
be set within the **.env** file as ``app.baseURL = 'http://example.com/'``.
2123
(Always use a trailing slash on your base URL!)
24+
25+
.. note:: If you don't set the ``baseURL`` correctly, in development mode,
26+
the debug toolbar may not load properly and web pages may take considerably
27+
longer to display.
28+
2229
#. If you intend to use a database, open the
2330
**app/Config/Database.php** file with a text editor and set your
2431
database settings. Alternately, these could be set in your **.env** file.
2532
#. If it is not on the production server, set ``CI_ENVIRONMENT`` to ``development``
2633
in **.env** file to take advantage of the debugging tools provided. See
2734
:ref:`setting-development-mode` for the detail.
2835

29-
.. important:: In production environments, you should disable error display and
30-
any other development-only functionality. In CodeIgniter, this can be done
31-
by setting the environment to "production". By default, the application will
32-
run using the "production" environment. See also :ref:`environment-constant`.
36+
.. important:: In production environments, you should disable error display and
37+
any other development-only functionality. In CodeIgniter, this can be done
38+
by setting the environment to "production". By default, the application will
39+
run using the "production" environment. See also :ref:`environment-constant`.
3340

3441
.. note:: If you will be running your site using a web server (e.g., Apache or Nginx),
3542
you will need to modify the permissions for the ``writable`` folder inside

0 commit comments

Comments
 (0)