![]() Thank you for reading and be sure to sign up to the newsletter for more Drupal 9 tips and also modern Frontend development and UI/UX design content, you won't be dissapointed.Example: Devel - A Drupal Contributed ModuleĮxample: Oral Histories Solution Pack - A Non-Contrib Islandora Module You can now log into your Drupal 9 site to configure your newly enabled module.įor more information on using composer please check out Using Composer to manage Drupal site dependencies on. drush en xmlsitemapīelow is the output of the Drush command. Next, we can enable the module using Drush, Drush needs to be installed and can be done using Composer. > DrupalProject\composer\ScriptHandler::createRequiredFiles Installing drupal/xmlsitemap (1.0.0): Downloading (100%) Package operations: 1 install, 0 updates, 0 removals Updating dependencies (including require-dev) Loading composer repositories with package information > DrupalProject\composer\ScriptHandler::checkComposerVersion composer require'drupal/xmlsitemap:^1.0'īelow is the output./composer.json has been updated To install XML Sitemap module type the below command into the terminal while in the root of your Drupal instance, the directory with the composer.json file in it. To install a module with Composer we use the composer require command and then the package name. If you are interested in how to get Composer installed make sure you sign up for the newsletter and I will notify you when I write about that and other great topics. You need to comfortable with CLI and have shell access, this guide also assumes you have Composer installed and is being used to illustrate how simple using Composer is. For some modules, you will need to also install dependencies libraries and by using Composer this is all done for you. Using Composer is a great way to manage your Drupal 9 site and in particular to install modules. Presto! You can now use the module, some modules will need to be configured so check the projects page and the README.txt.Įven though the process is painless to add new modules I prefer to use Composer as it manages dependencies, such as third-party libraries as in the case of SMTP module needing PHP Mailer library, or if a module relies on another Drupal project. Scroll to the bottom of the page and click Install.Check the check box next to the newly added module.Click on Enable the newly added modules to be taken back to /admin/modules page.Let's say you want to Enable the newly added module(s). ![]() You will be taken to a page with 3 options Install another module, Enable newly added modules or Administration page. Paste URL of module tar file in the Install from a URL input field.Shows the Install a new module page in Drupal 9 using the Claro admin theme. Go to the Extend page from the Manage menu in the admin menu. You can also update your module via the UI too. Using Drupal UI to Install a Moduleĭrupal provides a nice UI for those who would prefer to install and manage modules that way. ![]() With Drupal 8 and Drush 8 onward utilities such as archive were removed so I only really use Drush for enabling and clearing cache from the command line. ![]() ![]() Since Drupal 7 EOL is set I don't recommend using Drupal 7 if you are starting a new project. In older versions of Drupal such as Drupal 7, I have used Drush in my workflow. This guide is purely about installing and enabling a module. We are not going to go into the process of choosing modules and reasons for and for not choosing modules in this guide, I will cover that topic in another post sometime in the future. We are going to look at 2 ways of installing modules, using the Drupal UI to install modules and then my preferred way to manage a site, Composer, a dependency manager for PHP. This guide is going to cover Drupal 9 but the process is pretty much the same for older versions too. Installing modules in Drupal is a fairly trivial task once you have a Drupal site up and running. ![]()
0 Comments
Leave a Reply. |