Skip to main content

Getting Started with PHP Hosting

Deploy your PHP applications on ShardCloud with minimal configuration and maximum performance.
ShardCloud supports PHP applications with automatic dependency management via Composer and built-in web server.

Prerequisites

Before uploading your PHP application, ensure you have the following project structure ready.

Required Files

Essential files for deployment

Optional Files

Enhanced functionality files

Required Files

Your PHP application must include these two essential files:

1. Entry Point File

  • File: index.php or your main PHP file
  • Purpose: Main application entry point
  • Requirements: Must contain your application’s main execution code

2. ShardCloud Configuration

  • File: .shardcloud
  • Purpose: Platform-specific deployment settings
  • Requirements: Plain text configuration file in root directory
Both files are mandatory. Missing any of these files will prevent successful deployment.

Optional Files

Enhance your PHP application with these optional configuration files:

Composer Dependencies (Optional)

  • File: composer.json
  • Purpose: Defines PHP dependencies and project metadata
  • Benefits: Automatic dependency installation and autoloading
  • Note: If present, Composer will automatically install dependencies during deployment
composer.json is optional but recommended for applications using external packages or frameworks.

ShardCloud Configuration

The .shardcloud file configures your application deployment settings.

Configuration Example

DISPLAY_NAME=myfirstphpproject
DESCRIPTION=a simple php application
MAIN=index.php
MEMORY=512
VERSION=LATEST
SUBDOMAIN=php
PHP applications have moderate memory requirements. Adjust based on your application’s complexity and traffic.

Deployment Process

1

Prepare Entry Point

Ensure your main PHP file is ready and functional
2

Configure Dependencies

Optionally create composer.json for external packages
3

Configure Platform

Create .shardcloud file with deployment settings
4

Create Archive

Zip or RAR your project
5

Upload via Dashboard

Use ShardCloud dashboard to upload your archive
6

Deploy & Monitor

Application automatically deploys with dependency installation
I