DocsPHP

Deploying PHP Applications

Abasthan provides a robust, production-ready environment for PHP applications, including support for Laravel, Symfony, and WordPress.

1. Environment Overview

PHP apps on Abasthan run using PHP-FPM behind an Nginx reverse proxy. This setup is highly optimized for performance and is the industry standard for PHP hosting.

2. Supported Versions

We currently support PHP 8.1, 8.2, and 8.3. You can select your preferred version during the deployment process.

3. Build Command

For modern PHP applications, the build command is typically used to install dependencies via Composer.

  • Recommended: composer install --no-dev --optimize-autoloader

4. Public Directory

Specify the directory that should be served as the document root (e.g., public for Laravel or web for Symfony). If left empty, the repository root will be used.

5. Common Frameworks

Laravel

When deploying Laravel, ensure you set your APP_KEY in the Environment Variables section. Abasthan automatically handles the storage permissions required for Laravel to run smoothly.

WordPress

For WordPress, we recommend using a managed MySQL database on Abasthan and connecting it via your wp-config.php using environment variables.

// Example Laravel .env requirements
APP_NAME=AbasthanApp
APP_ENV=production
APP_KEY=base64:...
APP_DEBUG=false
APP_URL=https://your-app.abasthan.app