Search code examples
gitgithubdrupaldrupal-7acquia

Do I need to create repository to add modules to Drupal?


I created my Drupal website on Acquia Cloud, and am at the stage of adding modules. After some Googling, I came across an article on Acquia Cloud's website that said this:

If your website is hosted on Acquia Cloud, the module directories are part of the code repository, which is not directly writable. This means that you can't add a module using the Update Manager or SFTP.

Does this mean I need to work with the code locally, before pushing the changes to the website? I'm kind of confused because I tried installing a module using "Install New Module" and it worked fine.


Solution

  • I'm no Acquia Cloud expert. But according to what I've learned from the documentation, using the "Install New Module" feature of Update Manager will only work in a live development environment. I.E. If you attempted to use this feature on a normal development or production environment, it would fail. live development mode is different from regular development (I think), as it's a feature that's turned on only when you want to do code editing on the cloud. You can install modules in this way and then commit/push them from the dev environment to the live environment. Live Development mode disables certain features (see the Acquia cloud documentation for more details).

    Working on the code locally gives you more control over what's going on, as well as allowing you to test it in a safe, closed environment. Additional benefits of doing local development include (but aren't limited to) using advanced tools such as debuggers/profilers (like Xdebug), and Integrated Development Environments (IDES, such as PHPStorm).

    Most cloud hosting services (including Acquia) have some form of easy local development tool which will take care of most of the work of setting it up for you (instead of having to set up your own WAMP/LAMP/WEMP/LEMP stack). For example, I use Pantheon hosting at work and use a tool called Kalabox for this purpose (also allows me to run multiple local development environment side-by-side). I have never used Acquia cloud, but I hear they offer a tool just like that called Acquia Dev Desktop. These types of tools often come with version control software built in for repository management. A common workflow: you write code locallly, commit it, then push it up to the cloud dev environment. Integration and testing take place on the cloud dev and staging environments respectively, and then it goes to production from there.

    If I were you, this is where I would start for easy set-up of a local dev environment. Most developers/coders do their work locally, and then use their cloud dev and staging/testing environments as a integration and staging areas. Hope that helps!