How to install Bagisto on GCP (Google Cloud Platform)

Updated 21 January 2021

In our previous blog, we have learned how to install Bagisto on the AWS (under Free-Tier Policy). We’ll now move on to how to install Bagisto on GCP (under Free-Tier Policy) in this blog.

Installation Requirements For Bagisto:

What We’re Going To Use :

So let’s move to the installation part:

How to install Bagisto on GCP


STEP 1: Firstly, go to the Google Cloud Platform’s official site. And second, tap the Sign in button on the right-hand side, or you can sign up for FREE (if you open a new account, you can get $300 credit free for 1 year).



(i) Set up your billing account by linking your credit card before starting, and then create a project and navigate to your project’s dashboard.



(ii) Furthermore, Choose the Console option, once you have to access to the account.



(iii) Accept the Terms of Service offered by Google, and then select the option “AGREE and CONTINUE”.




STEP 2: Creation of Compute Engine VM Instance

Now generate a VM Instance by completing the necessary details such as Name, Region, Zone, MachineType to start with (you can select the machine size as needed), Boot Disk, Identity and API access (Enable full access to all Cloud APIs), Firewall (Enable HTTP traffic search & Allow HTTPS traffic). Finally, after mentioning all the details, press “Create”.







It’s going to take some time to create your new instance. Once the VM instance is created, you will get your public IP address just like the image below :




STEP 3 : Reserve IP Address

Every VM instance has an IP address, internal and external. Whenever you restart or stop your instance it will be assigned a new IP address. So your external IP address must be reserved as static. Go to VPC Network — > External IP addresses and IP address reservation. Configure your settings based on the image below, and ensure that the correct instance is attach to the IP address static.




STEP 4: Complete the steps below to connect your Ubuntu Server via Google Cloud Console.



After making a connection, use the terminal to execute commands and when you’ve done, use the exit command to disconnect from the instance.

After logging in, install the necessary application software.


(i) Install Apache2, php7.3, and its modules by executing the listed commands in the correct order.

If any of the PHP modules remains, simply through this command you may install it.

sudo apt-get install php7.3-<module_name>


Check the version of PHP, if it is php7.2.x, then allow the PHP-module apache and the rewrite-apache module.


(ii) Install Curl and Node.js version 10.x.


(iii) Install the Composer.



STEP 5: SSH User creation

Presently, we were in our server’s root user, but due to security issues, we do not keep our application code in the directories of the root user. So, we have to create another SSH user for this.

Create an SSH user who will be the owner of the application code. I create an SSH user with the name “bagisto.” You can pick any name you want.

adduser bagisto

This prompts a password window where you can set the password. The remaining fields can be left empty by simply pressing the enter key. Additionally, after creating a user, we will switch to a new user.



STEP 6: Download Bagisto by using the command below :

composer create-project bagisto/bagisto

After downloading, a directory name “bagisto” will be created inside the public HTML directory, then go to the public directory / bagisto. It is the directory that loads index.php.

cd bagisto/public



STEP 7: Apache configuration

To support the web pages we will configure apache. So, we need to switch again to the root user for configuring apache.


You will find the following lines as shown below, after executing the above command.

Now, change this to :


Save it, and exit after this.


Furthermore, configure the envvars file by executing the below command :


And find these lines :

Modify the apache SSH username by this way :


Configure file apache2.conf by the following command :


You will find the block code as shown below :

Modify it to the following code :

Save the file and exit it.



STEP 8: Install MYSQL Server for database creation by executing the following commands and when a password is asked after the below two commands, simply press ENTER.

Meanwhile, make some changes to php.ini file

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

After all the above mentioned steps, please enable permission to access your Bagisto root directory as shown below:



STEP 9 : Bagisto configuration

After all the above steps, go to your browser and enter the IP address of your VM instance or domain name. A page similar to the one below will open and then click the “continue” button.



Similarly, a new Environment Configuration page will appear after selecting the “continue” option. Then enter the details and enter the same credentials you obtain while creating a database. You can also use your domain name in the Default URL.





Firstly the front end will be open after Continue. After that to access, the dashboard hit the URL “” in the Admin panel, the admin login will open as in the image below.

Setup Bagisto Using GUI Installer - admin details


In addition, this is what the default admin dashboard looks like.



As a result, the homepage of your default eCommerce website will be like this:



At last your eCommerce platform is ready, Now you can use it in your own way.


In case of any help, query, or feedback please contact us or raise a ticket.


Thank you for reading this article,

Keep in touch!!



. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home