# Restart application

**URL:** <https://community.wowza.com/t/restart-application/53143>\
**Category:** Wowza Streaming Engine\
**Created:** [April 9, 2019, 1:37pm UTC](https://community.wowza.com/t/restart-application/53143 "2019-04-09T13:37:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LogicaHost\_Solucoes](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@LogicaHost\_Solucoes](https://community.wowza.com/u/LogicaHost_Solucoes)\
**Post date:** [April 9, 2019, 1:37pm UTC](https://community.wowza.com/t/restart-application/53143/1 "2019-04-09T13:37:28Z")

</div>

Hello friends

Any command api wowza for restart application?

-\>

I would like to ask how to restart wowza single application from command line in PHP

---

<div class="post-metadata">

**Author:** ![Emre\_Karatasoglu\_Adv](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@Emre\_Karatasoglu\_Adv](https://community.wowza.com/u/Emre_Karatasoglu_Adv)\
**Post date:** [April 9, 2019, 9:41pm UTC](https://community.wowza.com/t/restart-application/53143/2 "2019-04-09T21:41:54Z")

</div>

Hi @LogicaHost Solucoes here it is

```auto
<?php
function wowzaAppOperation($appName, $operation)
{
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/" . $appName . "/actions/" . $operation);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt($ch, CURLOPT_POST, 1);

    $headers = array();
    $headers[] = "Accept: application/json; charset=utf-8";
    $headers[] = "Content-Type: application/json; charset=utf-8";
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

    $result = curl_exec($ch);

    if (curl_errno($ch)) {
        echo 'Error:' . curl_error($ch);
    }
    curl_close($ch);

    return $result;

}

echo wowzaAppOperation("live", "restart");

?>

```

also you can call wowzaAppOperation(“live”,“shutdown”)

wowzaAppOperation(“live”,“shutdown”) or wowzaAppOperation(“live”,“start”)
