Rename an Azure Function
Rename an Azure Function
Rename an Azure Function
Re: Rename an Azure Function
The UI does not directly support renaming a Function, but you can work around this using the following manual steps:
- Stop your Function App. To do this, go under Function app settings / Go To App Service Settings, and click on the Stop button.
- Go to Kudu Console: Function app settings / Go to Kudu (article about [that](https://blogs.msdn.microsoft.com/benjaminperkins/2014/03/24/using-kudu-with-windows-azure-web-sites/))
- In Kudu Console, go to D:\home\site\wwwroot and rename the Function folder to the new name
- Now go to D:\home\data\Functions\secrets and rename [oldname].json to [newname].json
- Then go to D:\home\data\Functions\sampledata and rename [oldname].dat to [newname].dat
- Start your function app, in the same place where you stopped it above
In the Functions UI, click the refresh button in the top left corner, and your renamed function should appear
**Note:** doing this can lose some historical logging.
[Github Issue for renaming Azure Function](https://github.com/projectkudu/AzureFunctionsPortal/issues/198)
Edit for new info
To anyone like myself that arrived here looking to rename their function, despite this being the previously correct answer, there is now a much smoother CMD based process as detailed in [this answer](https://stackoverflow.com/a/46841668/1350987) by SLdragon and an even smoother GUI based process detailed in [this answer](https://stackoverflow.com/a/51055783/1350987) by Amerdeep below.
- Stop your Function App. To do this, go under Function app settings / Go To App Service Settings, and click on the Stop button.
- Go to Kudu Console: Function app settings / Go to Kudu (article about [that](https://blogs.msdn.microsoft.com/benjaminperkins/2014/03/24/using-kudu-with-windows-azure-web-sites/))
- In Kudu Console, go to D:\home\site\wwwroot and rename the Function folder to the new name
- Now go to D:\home\data\Functions\secrets and rename [oldname].json to [newname].json
- Then go to D:\home\data\Functions\sampledata and rename [oldname].dat to [newname].dat
- Start your function app, in the same place where you stopped it above
In the Functions UI, click the refresh button in the top left corner, and your renamed function should appear
**Note:** doing this can lose some historical logging.
[Github Issue for renaming Azure Function](https://github.com/projectkudu/AzureFunctionsPortal/issues/198)
Edit for new info
To anyone like myself that arrived here looking to rename their function, despite this being the previously correct answer, there is now a much smoother CMD based process as detailed in [this answer](https://stackoverflow.com/a/46841668/1350987) by SLdragon and an even smoother GUI based process detailed in [this answer](https://stackoverflow.com/a/51055783/1350987) by Amerdeep below.