PHP - create & deploy the project on MDB GO

How to deploy & host PHP app - tutorial & free hosting

This guide will take you step by step on how to create your project and deploy using MDB CLI.


Backend project - PHP

Initialize

Let's initialize npm project first:


              $ mdb blank init 
        

Specify project name and choose an npm and . You can also add other meta descriptions or accept default values.

project initalization

Open project in editor (ie. VS Code), create index.php and create your app. You can use sample code:


         <?php echo("Hello PHP World"); ?>
                  

Publish

Once you finish building your project, use the following command do deploy it:


              $ mdb backend publish -p php7.4 

        

Done! Your project will be ready. If you want to check project console use mdb logs command.

Video tutorial: