Drupal Commerce is one of the best solutions you can find for your ecommerce needs. With the release of Drupal Commerce 2.x, it only gets better. What better way to celebrate this milestone than educating the users about setting it up. So in this guide, I’ll show you how to install Drupal Commerce using Composer on your Cloudways server.
Note: Cloudways has Composer and Drush preinstalled on all its servers.
Here are the steps involved in the installation process:
- Launch Server
- Launch Drupal 8 Application
- Delete the database
- Launch SSH terminal
- Update Composer
- Install Drupal Commerce
- Setup store details
Login to your Cloudways account and launch a server of your choice. (Skip this step if you already have a server on Cloudways).
When your server is done setting up, go to the Applications tab and click the Add Application button, located in the top right corner.
Select Drupal 8.x.x from the drop-down list. Enter the details and then wait a few minutes for the application to finish the setup process.
Delete the database
Now, you will need to remove the existing database in order to make way for the new website’s database. You can do this by navigating to your Application’s dashboard and clicking the Launch Database Manager button.
Once inside, select all tables, scroll down to the bottom and click the Drop button.
Launch SSH Terminal
Next, go to your server’s dashboard and click the Launch SSH Terminal button.
Once logged-in, navigate to your application’s directory.
Before proceeding with the installation of Drupal Commerce, you will need to make sure that the Composer version is up to date. You can do this by simply going to the SSH terminal and typing in the following command:
Install Drupal Commerce
Now, I will demonstrate how you could install Drupal Commerce. If you thought this would be manual (and hectic) task, here’s a surprise for you: You can install Drupal Commerce along with the Drupal core by simply typing the following command in the terminal:
composer create-project drupalcommerce/project-base mystore --stability dev
This will now install everything automatically, including all the libraries and dependencies required by Drupal Commerce.
Setup Store Details
Now, go to the application’s dashboard and click the Launch Website button.
You will now be brought to the standard Drupal installation screen.
Proceed as you normally would with a standard Drupal installation. Upon completion, you will be brought to your brand new Drupal Commerce website.
That’s it! It was that easy. You’ve successfully setup Drupal Commerce on Cloudways using Composer. If you have any questions please leave me a comment and I’d be happy to help.
If you are a fan of Drupal Commerce, have a look at our list of, Top Drupal Commerce Themes.
Start Growing with Cloudways Today.
Our Clients Love us because we never compromise on these