Documentation/Installation and configuration/1. Installation of the project

Project Installation

The HLEB2 framework is designed such that its installation and requirements are minimally simple.
To install the framework, all you need is PHP version 8.2 or higher with a basic set of extensions and 2 megabytes of free space on your device.

If you want to use a PHP version below 8.2, try the first version of the framework.

The framework's code is located in the GitHub repository at https://github.com/phphleb/hleb. The first step of installation involves copying this code to a server or a local folder where it will be used.


#Copying from Repository

Visit the project's repository on GitHub (link above).
Click on the Code button and then Download ZIP (direct link to the file). Extract the downloaded archive to the desired folder on the server or locally.

Use only verified links to the official repository of the framework.


#Cloning Using Git

To clone the framework repository into the new_project folder, execute the following git command:

$git clone https://github.com/phphleb/hleb new_project

This command will create a new_project folder, initialize a .git subdirectory in it, then download all the data for this repository and extract a working copy of the latest version. If you navigate to the directory created by this command new_project, you will find the project files ready for use.


#Local Development with Docker

To try the framework's capabilities and deploy local development from a Docker image, use the repository phphleb/toaster.


#Installation Using Composer

An alternative option is using Composer. This method is more preferable, as Composer will allow you to install various packages and extensions in the future. Install the current version of the project using the console command (assuming Composer is installed globally):

$composer create-project phphleb/hleb new_project

This command will install the framework into the new_project folder.


#Extension for Database Operations

If your application will work with a database, you need to install the PHP PDO extension and the corresponding driver (for example, pdo_mysql for MySQL).


#Project Public Directory

For further actions, you need to configure the framework's public folder if the initial name public does not fit for some reason.
For instance, on some hosting services, a folder named public_html is used. To change the project's public folder, simply rename the public folder.
Additionally, in this case, you need to change the predefined name in the console file, which is located in the root folder of the project.

Introduction Setting up the framework

Page translated: chatgpt 4-o
Back to top