Deploy PHP Apps via GitHub
Deploy Now offers a convenient toolset to automate builds and deployments for dynamic PHP applications. Workflows are automated with GitHub Actions and connect to IONOS shared hosting infrastructure. An automatic setup with default workflows are available for Laravel and Symfony. Set up a PHP project
in Deploy Now for PHP scripting at runtime and a MariaDB for each deployment.
Supported frameworks
Deploy Now can host any PHP Application built with Composer and Node.js, see languages supported by GitHub Actions. Setting up Content Management System such as WordPress is possible, but does not yet come with automated, prefilled setups.
Laravel
After you connect your Laravel repository, Deploy Now suggests you build steps you can adapt to your liking. It might help you to deploy our laravel sample project for a completely prefilled setup including build steps, prefilled .env
, .htaccess
, file persistency management and automated runtime commands before and after each deployment. A complete manual of setting up a Laravel project can be found below.
Please note that the syntax of the variable references changed since the release of the video
Symfony
Deploy Now automacally detects Symfony projects and suggests build steps accordingly. The setup follows the same logic as a Laravel setup. You can deploy our symfony sample project for a quick start.
Features
- Automated builds and deployments
- Connect your custom domain
- SSL automatically connected and renewed
- Set up Cron Jobs
- Deploy additional branches with Staging Deployments
- Deploy one branch to multiple environments with Multi Deployments
- 10GB storage
- Up-to-date PHP versions
- MariaDB for each deployment
- Monitor traffic with Visitor statistics
- Fixed monthly pricing (see plans for US, UK, GER, CA, ES, FR, MX and IT)
Setup
After connecting your repository, Deploy Now will guide you trough the following steps. Afterwards, the workflow will be set up to automacially build and deploy your project on every following git push
.
- Build configuration: Define build depencies and commands
- Runtime configuration: Set up application configuration including database credentials
- Deployment configuration: Define file persistency and automate runtime commands
Settings
Build setup
Build settings like dependencies, commands and environment variables can be adapted directly in the configuration files of the GitHub Actions workflow under .github/workflows
.
Domains & TLS
Custom domains can be connected in a few clicks to replace the IONOS placeholder domain. If you want to connect a domain that you have not purchased at IONOS, you need to switch to the IONOS nameservers first. Each domain is automatically SSL secured.
Redirects, rewrites, HTACCESS
Redirects and rewrites can be managed via .htaccess
files. Visit Apache configuration for examples.
Cronjobs
Cron Jobs can be managed in the config.yaml
under .deploy-now
as described here.
Managing running projects
File space
The current state of the webserver files including logs can be viewed via the deployment viewer in the Deploy Now dashboard. You can also download files here. Moving files onto the server is only possible via GitHub. If you want to keep files persistent, i.e. prevent them from being overwritten with the next commit, you can do this by adding excludes to the config.yaml
under .deploy-now
. Visit deployment configuration for instructions.
Database
Databases will be automatically created for both production and staging deployments. You can access your databases via PHP MyAdmin. A backup of your database is creates automatically once per day and stored for 7 days. If you wish to access or restore a database backup, please contact our customer service.
Execute commands on runtime
To avoid inconsistencies between the GitHub repository and the runtime version of your project, Deploy Now does not offer SSH access to the server. Users can define commands to be executed on the runtime before and after deployments in the config.yaml
under .deploy-now
as described here.