Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detail to Composer docs #297

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/getting_started/how_to_install_mautic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ With Composer you can add new dependencies to install along with Mautic:
cd your-directory
composer require mautic/mautic/helloworld-bundle

.. note::

As this method of installation moves the core app files into a folder called ``docroot`` from which Mautic runs, you should ensure that you configure your web server to serve files from this directory. This might mean updating your virtual host and/or NGINX configuration to have ``<your directory>/docroot`` as the root directory. If you don't do this, it's likely you'll see errors when you try to access your Mautic instance.

The Composer ``create-project`` command passes ownership of all files to the created project. You should create a new git repository, and commit all files not excluded by the .gitignore file.

.. vale off
Expand All @@ -344,7 +348,7 @@ What does the Recommended Project template actually do?

When installing the given ``composer.json`` the following occurs:

- Install Mautic in the ``docroot`` directory.
- Install Mautic in the ``docroot`` directory. See earlier note about updating your hosting configuration.
- Autoloader uses the generated Composer autoloader in ``vendor/autoload.php``, instead of the one provided by Mautic in ``docroot/vendor/autoload.php``.
- Plugins - packages of type ``mautic-plugin`` - are in ``docroot/plugins/``.
- Themes - packages of type ``mautic-theme`` - are in ``docroot/themes/``.
Expand Down Expand Up @@ -437,14 +441,18 @@ It's possible to change this folder to your own needs.

In following examples, ``docroot`` moves into ``public``.

.. note::

Remember that you must also update your web server configuration to point to the new folder.

New installations
-----------------

* Run the create-project command without installing:

.. code-block:: bash

composer create-project mautic/recommended-project:^4 some-dir --no-interaction --no-install
composer create-project mautic/recommended-project:^5 some-dir --no-interaction --no-install

* Do a find and replace in the ``composer.json`` file to change ``docroot/`` into ``public/``
* Review the changes in the ``composer.json`` file to ensure that there are no unintentional replacements
Expand Down
Loading