In this page:
This domumentation explains the whole process from installing PHP and composer, to running your first WebFiori application. If you are familiar with how to install PHP on windows or you already have configured your environment, skip to the section " Creating WebFiori Application ".
1. Download and Extract PHP Binaries:
C:\PHP
on your local drive.
C:\PHP\8.3.3
(replace "8.3.3" with the actual version you downloaded).
2. Add PHP to PATH Environment Variable:
C:\PHP\8.3.3
(replace "8.3.3" with your actual PHP installation directory if it differs).
3. Configure PHP:
C:\PHP\8.3.3
(or your respective version folder).
php-development.ini
to
php.ini
.
php.ini
file in a text editor and enable the required extensions (e.g., mbstring, mysqli) by removing the semicolons (;) in front of their corresponding lines.
4. Verify PHP Installation:
php -v
-- Note: For production environments, a dedicated web server application like Apache , Nginx , or IIS is strongly recommended.
1. Download Composer:
Visit the official Composer download page: https://getcomposer.org/download and download the PHAR archive (executable file).
2. Create a Script Folder and Update Path Environment Variable:
C:\PHP\scripts
to store your Composer script.
C:\PHP\scripts
folder to path environment variable. The approach to do it was explained in section 2 of how to install PHP.
3. Move Composer Archive and Create Batch Script:
C:\PHP\scripts
folder.
Code
@echo off
php "%~dp0composer.phar" %*
C:\PHP\scripts
folder.
4. Verify Installation:
composer -V
If Composer is installed correctly, the command should display the installed Composer version information.
Method 1: Composer (Recommended)
cd
command).
my-site
with your preferred project folder name:
Code
composer create-project webfiori/app my-site --prefer-dist
Method 2: Manual Installation
my-site
).
my-site\app
my-site\public
my-site
) using the command prompt.
Code
php -S localhost:8080 -t public
This launches the server on port 8080. The application can be accessed in your web browser at
localhost:8080
.
Customization of Application Folder Name:
The application source code folder name can be modified by adjusting the
APP_DIR
constant located at the beginning of the
index.php
file.
Important Note:
Previous: Introduction
Next: Folder Structure