Current Location: Home> Latest Articles> ice-php Installation Guide: Quick Start with Lightweight PHP Framework

ice-php Installation Guide: Quick Start with Lightweight PHP Framework

gitbox 2025-07-26

What is ice-php?

ice-php is a lightweight and high-performance PHP development framework designed to offer developers a clean API and an efficient development experience. With ice-php, you can rapidly build stable web applications, making it ideal for small, medium, or even large-scale projects.

System Requirements for Installing ice-php

Before installation, ensure that your server environment meets the following requirements:

  • PHP version: 7.2 or higher
  • Composer: dependency management tool
  • Web server: Recommended Nginx or Apache
  • Database support: MySQL or PostgreSQL

Installation Steps

Install Composer

On Linux or macOS, you can install Composer using the following commands:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Windows users can download and install Composer from its official website by following the provided instructions.

Create a New ice-php Project

After Composer is installed, run the following command to create a new ice-php project:

composer create-project --prefer-dist ice-php/ice-project my-project

Replace “my-project” with your desired project name.

Configure the Web Server

Configuring the web server is essential for running your ice-php application. Below are examples for Apache and Nginx:

Apache Configuration

DocumentRoot "/path/to/my-project/public"
AllowOverride All
Require all granted

Nginx Configuration

server {
    listen 80;
    server_name your_domain.com;
    root /path/to/my-project/public;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.x-fpm.sock; # Adjust based on your PHP version
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Run the Application

Once everything is configured, open your browser and visit the domain or IP address you set up. If configured correctly, you'll see the ice-php welcome page, indicating a successful installation.

Frequently Asked Questions

How to update ice-php?

Run the following command in your project root directory to update the framework:

composer update

Which databases does ice-php support?

ice-php supports multiple databases, including MySQL and PostgreSQL. Choose the one that best fits your project's needs.

Conclusion

By following this guide, you've successfully installed the ice-php framework. From environment setup to server configuration, the process is straightforward and efficient. With ice-php, developing modern web applications becomes simpler and more productive.