This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

CloudwaysCDN — a powerful solution that offers superior performance and satisfied global audience for your business. Read More

Deploy PHP Application via Laravel’s Envoyer

Updated on  25th May

3 Min Read
Reading Time: 3 minutes

Envoyer is a deployment tool used to deploy PHP applications. The best thing about the the tool is the zero downtime during deployment. This means that your application and the customers using it are not even aware of the fact that a new version has been pushed.

Envoyer works well with major repository management platforms such as GitLab and Bitbucket. Other benefits include unlimited deployments and team members.

deploy PHP application

The following blog will guide you through the process of deploying applications on Cloudways using Envoyer.

Create Envoyer Account and Add a Project

Create an Envoyer account and login. Next, add a new project.

Connect to a Repository

Next, connect your repository. The good thing about Envoyer is that this repository could be hosted on any platform including Github, Bitbucket or any other self-hosted repository.

Add the Server

Head to the server tab and click the add server button.

You can get the credentials for adding the server from the Master Credentials section inside the Cloudways Console. But first you need to Signup at Cloudways and launch Laravel application.

Fill out all the required fields and save the server.

Remember Envoyer will create additional directories within the main directory (releases, storage and current).

After saving the server, you will be provided a SSH key. Copy that key and head over to your Cloudways Console. Click ‘SSH Public Keys’ button. Give a label to your key and click Submit.

After adding SSH key, you should be able to connect to your server. Click the tiny refresh button to test the connection status.

Envoyer allows you to manage your environment. Click Manage Environment and enter the SSH key. You can now set the contents of your environment.

Deploy PHP Application

Hit the Deploy button to deploy your PHP project. You can also deploy applications via Git Push by selecting ‘Deploy when code is pushed’ option in the settings.

The deployment process could be viewed in the deployment tab. You can get additional information related to deployment by clicking the arrow button next to the deployment status.

You can clearly see that Envoyer takes minimal time to deploy application on your server.

Read more: Enhanced Cloudways Staging Environment Is Now Available for All Users

Post PHP Deployment Features

Once you have deployed PHP application, you could check the status of your application from three locations (New York, London, Singapore). In case of a disaster, you have the option of rolling back the current deployment. You can enable this option by providing the health check URL in the settings.

Additionally, you can set up heartbeats to monitor cron jobs for your application. You could also set up a notification channel like Slack and Hipchat to receive notifications.

 

Share your opinion in the comment section. COMMENT NOW

Ali Azmi

Ali Azmi is Associate DevOps Engineer at Cloudways - A Managed PHP Cloud Hosting Platform. He is skilled in developing PHP applications particularly in Laravel. He is passionate about contributing to open source projects.

Create Laravel apps without the worry of server management.

Deploy your app on optimized PHP hosting servers for Laravel.

Get Our Newsletter
Be the first to get the latest updates and tutorials.

THERE’S MORE TO READ.