Application hosting
Deploy Yii with PHP, MariaDB, Redis, and Scheduled Tasks
Deploy a Yii application on HostRight with Composer, PHP extensions, a private project root, MariaDB, Redis, SSL, Git, SSH, and Cron Jobs.
Yii is a structured PHP framework for websites, APIs, and admin applications. HostRight can provide its runtime, Composer dependencies, database, Redis, SSL, and scheduled-task workflow.
Set the application root
Deploy the source code outside the public directory and point the domain to the framework's public entry directory:
apps/example-yii/
├── commands/
├── config/
├── models/
├── runtime/
├── web/
├── composer.json
└── .env
For Yii applications, the public document root is commonly web/. Deploy with Git or SFTP and run composer install --no-dev from SSH.
Configure PHP, MariaDB, and Redis
Choose a supported PHP version and required extensions in Extra Features → Select PHP version. Create a database in Account Manager → Databases and set its connection values in protected environment configuration.
Enable Redis for cache, sessions, or queues, then copy the exact Unix socket path from the Redis page. Use database management and Redis setup for service-specific instructions.
Run scheduled commands
Use Cron Jobs for Yii console commands such as cleanup, imports, reports, or queue maintenance. Run commands with absolute paths and redirect output to a private log file. Add an application lock if a task must not overlap.
Launch checklist
Enable SSL after DNS points to HostRight, disable debug output, test the web/ document root, verify database and cache connections, and take a backup before migrations or framework upgrades.