Installing the TheMAG on Drupal
There were two packages in the "INSTALLATION" directory from which you can install TheMAG on Drupal.
- themag-drupal-recommended.zip
- themag-drupal-legacy.zip
Both packages are identical regarding Drupal core, modules, themes, etc. The only difference is the file structure.
The themag-drupal-recommended package is based on a drupal/recommended-project
with a relocated document root. Since keeping the vendor directory outside the web
server's document root is better for security. This layout allows you to configure
your webserver only to provide access to the Drupal files inside the "web
" directory.
The other one, "themag-drupal-legacy" is based on the drupal/legacy-project
, which has
the same layout used in Drupal 8.7.x and earlier. Here, the files, index.php
the
core
etc., are placed directly at the project root next to composer.json
and the
vendor
directory, which is less secure.
Both packages can be managed with Composer. However, the legacy package comes with preinstalled dependencies for those not so familiar with Composer. In the end, no matter which package you decide to use, the installation procedure is the same.
- Unzip the content from the package you want to use on your server or development environment. If you still do not have any development environment, you may want to try Lando for development.
- To go with the recommended package, you must run Composer first to install all dependencies. If not, you can skip this step. To install all dependencies with Composer, run
composer install
. - Now when it is all in place, you can install TheMAG with Drush or from the UI.
Install with Drush
To install using a command line, run the following Drush command:
vendor/bin/drush site:install \
--existing-config \
--db-url=mysql://db_user:db_pass@localhost/db_name \
--account-name="demo" \
--account-pass="demo" \
--account-mail="you@example.com"
Replace db_user, db_pass, and db_name with your database info. The --account-name
is your Drupal username, and the --account-pass
is the password.
Install from UI
To install the theme from the UI, do the following:
- Open the URL to your site in a web browser to start the installer.
- Select Language
- Choose "Use existing configuration," click "Save and Continue," and wait for the installer to finish.