![php-wasmer-starter package icon](/_next/image?url=https%3A%2F%2Fcdn.wasmer.io%2FCACHE%2Fimages%2Ficon%2Fpackage%2F27db3d31-d102-4d4f-a98b-756e44603290_default_icon%2Fb29162c819454df55deadf512ed6c574.png&w=96&q=75)
wasmer-examples/php-wasmer-starter
Public
wasmer run wasmer-examples/php-wasmer-starter
wasmer run wasmer-examples/php-wasmer-starter
This is a simple PHP application starter
Getting Started
Modify the logic of your the PHP application in the app/index.php
file.
$ echo '<?php phpinfo() ?>' > ./app/index.php
You can run things locally with:
$ php -t app -S localhost:8080
Or you can also use wasmer run
to run it locally (check out the Wasmer install guide):
$ wasmer run . --net
[!TIP] You can also run
wasmer run wasmer-examples/wordpress-wasmer-starter --net
to run the remote package
Open http://localhost:8080 with your browser to see the result.
Deploy on Wasmer Edge
The easiest way to deploy your PHP app is to use the Wasmer Edge.
Live example: https://wordpress-php-starter.wasmer.app/
Run this commmand to deploy to Wasmer Edge:
wasmer deploy
[!NOTE] You will need to change the namespace in
wasmer.toml
to your own namespace and app name inapp.yaml
to your own app name.