Before we start installing Drupal 9 via Docksal, let's briefly discuss a few concepts.
A server can be defined as a sophisticated machine that stores content for websites and is capable of processing more data than a regular computer. In other words, it is a system that allows users to access data online and makes the data available for their use.
SSH (Secure Shell) is a remote server connection that enables file transfer operations and allows users to connect to a server on a network. Additional software is required to establish a connection on Windows and Mac OS operating systems.
A hosts file is a plain text file that can be opened and edited with text editors, which contains the IP addresses needed to access an internet site. It maps the names of internet sites to IP addresses. If there is an issue, block, or redirection in the DNS service, and the desired sites are not opening, you can make them available by making changes to specific domain names and IP addresses in the hosts file.
Now we can create a project from scratch via Docksal. First, we need a terminal. You can download Docker Desktop for Mac OS operating systems or Putty for Windows operating systems and run it by entering the necessary server information.
Then, run the following commands in the terminal that opens:
Let's create a project called "drupalproject"
fin run-cli composer create-project drupal/recommended-project drupalproject
Let's enter the directory where the project is located;
cd drupalproject
Let's create a directory named .docksal in the project;
mkdir .docksal
Let's set the root directory of your project document as web;
fin config set DOCROOT=web
And let's get the project started;
fin project start
Our project was created and gave us the url address. In order to access our project from our browser, we need to add your server ip and url address to the hosts file in the C:\Windows\System32\drivers\etc directory. Since the hosts file requires special permission, don't forget to run the application as administrator!
<host machine IP> drupalproject.docksal
Now we can access our project from our browser.
By typing the address of our project in our browser, we come to the first setup screen. We set the language.
We will need a profile for installation, we choose a standard profile.
We fill in the fields required for database configuration as follows.
When we save, all the modules we need are installed.
Then you can complete the installation by entering your own information such as the site name required to configure the site, whether the site can send and receive e-mail for any updates, and the site e-mail address.
Congratulations, you have completed Drupal 9 installation via docksal.