Is it possible to send Drupal 8 files from Git Wampserver?

Is it possible to send Drupal 8 files from Git Wampserver?

In this article, we are going to explain the process of transferring the Drupal 8 files from Wampserver which runs in the environment of localhost to the platform of hosting remote mode with the help of Git.

Why Git is necessary to send files from Drupal 8 to Wampserver? Git has the direct and indirect connection between Drupal 8 where it is necessary to build a control version in the development of Agile. It takes a deep look into themes and modules especially!

In Drupal 8, you can take the files from the environment of the desktop program to repository code, server production and sandbox.

Let start from step 1:

Installation of web server localhost and privilege of administrator is very important while configuring files from Drupal 8. It should have the capacity to run Apache, PHP and MySQL. One of the best applications of webserver localhost is none other than Wampserver. Usage of the platform called docker desktop is considered as a virtualization container. If you are worried about running mentioned localhost environment better go with Apache NetBeans, Acquia Dev Desktop and a web server stacked with VirtualBox.

Choose one from the given option and then start installing Drupal 8. Go to the website of Git and then check the recently released Git version for download.

After the download of Git, tap on the menu Windows “Start”. Go to the search bar for typing Git word and so, you will get more options. Choose “Git Bash” and then check the successful installation of folder C: Program Filesgitbin. You can name it Git cache!

Note: You are transferring the Drupal 8 file to a web server connected remotely using GitRepository and command Git Bash.

Step 2: Use the command for opening Git Bash and enter the path where Drupal 8 is installed.

Check the path whether it is correct or not and then start running Git Bash for command execution:

Code:
cd c:/wamp/www/site1
Usage of utility CLI helps to ensure the status of folder Drupal 8

Code:
git status
You will get the result as:

Code:
fatal: Not a git repository (oranyofthe parent directories): .git.
Here, you need to bring the folder into Git Repository:

Code:
git init
Again, you will get the successful message as:

Code:
Initialized empty Git repository inc:/wamp/www/site1/.git/.
Here, you need to type as:

Code:
git status
You will get the file called gitignore but to make necessary changes in this file it is a must for you to configure Git correctly.

Step 3: If you are a user of Windows, while transferring Drupal 8 files to a remote web server it is a must for you to use the command line of PuTTY.

Start the installation of PuTTY and get the IP address to do manual configuration. In your remote web server, enter the port number and IP address. Check the default configuration in SSH!

Step 4: Here, you need to get connected with the cPanel along with the connection of SSH. It is mandatory to check the status of the environment by using the command:

Code:
ls
From the root directory, it gets displayed with folders and files in the list. Do test for available version of Git:

Code:
git –version
Go to cPanel for choosing file manager and start creating Git Repository from the root directory.

Code:
mysite.git
Go to the PuTTY folder /mysite.git to execute the command:

Code:
git init –bare
By now, Git Repository is created in a remote server. Now, you need to create a new file called “post-receive” in the folder /mysite.git/hooks.

Start editing the file “post-receive” to add the below commands:

Code:
#!/bin/sh
GIT_WORK_TREE=/home/username/mysite.com git checkout –f
Save all the changes!

Step 5: Start adding Git Repository in a remote server with the below-mentioned code:

Code:
git remote add mysite ssh://user@www.example.com:18765/home/user/mysite.git
Use below-mentioned command for configuring the settings of Git:

Code:
gitpush mysite master
You have transferred files from the environment of the localhost webserver to the remote web server. Remote mode helps you to save time and effort!
Author
kumkumsharma
Views
2,599
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top