diff --git a/user_guide_src/source/installation/installing_composer.rst b/user_guide_src/source/installation/installing_composer.rst index 5d550039b94e..7b0b5d34b9f3 100644 --- a/user_guide_src/source/installation/installing_composer.rst +++ b/user_guide_src/source/installation/installing_composer.rst @@ -7,9 +7,9 @@ Composer Installation Composer can be used in several ways to install CodeIgniter4 on your system. -The first two techniques describe creating a skeleton project +The first technique describes creating a skeleton project using CodeIgniter4, that you would then use as the base for a new webapp. -The third technique described below lets you add CodeIgniter4 to an existing +The second technique described below lets you add CodeIgniter4 to an existing webapp, .. 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. This installation technique would suit a developer who wishes to start a new CodeIgniter4 based project. -Installation & Set Up ---------------------- +Installation +------------ In the folder above your project root:: @@ -52,7 +52,11 @@ A sample such installation command, using the default project-root "appstarter": > composer create-project codeigniter4/appstarter --no-dev -After installation you should follow the steps in the "Upgrading" section. +Initial Configuration +--------------------- + +After installation, a few initial configurations are required. +See :ref:`initial-configuration` for the details. .. _app-starter-upgrading: @@ -126,6 +130,9 @@ The same `CodeIgniter 4 framework `_ repository described in "Manual Installation" can also be added to an existing project using Composer. +Installation +------------ + Develop your app inside the ``app`` folder, and the ``public`` folder will be your document root. @@ -136,8 +143,8 @@ In your project root:: As with the earlier two composer install methods, you can omit installing phpunit and its dependencies by adding the ``--no-dev`` argument to the ``composer require`` command. -Set Up ------- +Setting Up +---------- Copy the ``app``, ``public``, and ``writable`` folders from ``vendor/codeigniter4/framework`` to your project root @@ -148,6 +155,12 @@ Copy the ``env``, ``phpunit.xml.dist`` and ``spark`` files, from You will have to adjust the system path to refer to the vendor one, e.g., ``ROOTPATH . '/vendor/codeigniter4/framework/system'``, - the ``$systemDirectory`` variable in **app/Config/Paths.php** +Initial Configuration +--------------------- + +A few initial configurations are required. +See :ref:`initial-configuration` for the details. + .. _adding-codeigniter4-upgrading: Upgrading diff --git a/user_guide_src/source/installation/installing_manual.rst b/user_guide_src/source/installation/installing_manual.rst index f2ffac576dcf..aa710dcdf257 100644 --- a/user_guide_src/source/installation/installing_manual.rst +++ b/user_guide_src/source/installation/installing_manual.rst @@ -26,32 +26,33 @@ and extract it to become your project root. The symbols that can be used are ``/``, ``_``, ``.``, ``:``, ``\`` and space. So if you install CodeIgniter under the folder that contains the special characters like ``(``, ``)``, etc., CodeIgniter won't work. -Setting Up ----------- +Initial Configuration +===================== -None +After installation, a few initial configurations are required. +See :ref:`initial-configuration` for the detail. .. _installing-manual-upgrading: Upgrading ---------- +========= Download a new copy of the framework, and then replace the ``system`` folder. Read the :doc:`upgrade instructions `, and check Breaking Changes and Enhancements. Pros ----- +==== Download and run Cons ----- +==== You are responsible for merge conflicts when updating Structure ---------- +========= Folders in your project after set up: app, public, system, writable diff --git a/user_guide_src/source/installation/running.rst b/user_guide_src/source/installation/running.rst index bb96d98f488d..4f24edd76950 100644 --- a/user_guide_src/source/installation/running.rst +++ b/user_guide_src/source/installation/running.rst @@ -12,13 +12,20 @@ This section addresses how to use each technique, and explains some of the pros If you're new to CodeIgniter, please read the :doc:`Getting Started ` section of the User Guide to begin learning how to build dynamic PHP applications. Enjoy! -Initial Configuration & Set Up -============================== +.. _initial-configuration: + +Initial Configuration +===================== #. Open the **app/Config/App.php** file with a text editor and - set your base URL. If you need more flexibility, the baseURL may + set your base URL to ``$baseURL``. If you need more flexibility, the baseURL may be set within the **.env** file as ``app.baseURL = 'http://example.com/'``. (Always use a trailing slash on your base URL!) + + .. note:: If you don't set the ``baseURL`` correctly, in development mode, + the debug toolbar may not load properly and web pages may take considerably + longer to display. + #. If you intend to use a database, open the **app/Config/Database.php** file with a text editor and set your database settings. Alternately, these could be set in your **.env** file. @@ -26,10 +33,10 @@ Initial Configuration & Set Up in **.env** file to take advantage of the debugging tools provided. See :ref:`setting-development-mode` for the detail. -.. important:: In production environments, you should disable error display and - any other development-only functionality. In CodeIgniter, this can be done - by setting the environment to "production". By default, the application will - run using the "production" environment. See also :ref:`environment-constant`. + .. important:: In production environments, you should disable error display and + any other development-only functionality. In CodeIgniter, this can be done + by setting the environment to "production". By default, the application will + run using the "production" environment. See also :ref:`environment-constant`. .. note:: If you will be running your site using a web server (e.g., Apache or Nginx), you will need to modify the permissions for the ``writable`` folder inside