There are times when you might want to move an app from one App Service plan to another. This can be done easily through Azure Portal, provided that the app service plans comply with the restrictions below, namely that they are:
- in the same resource group, and
- in the same geographical region.
Let’s assume that you have a web app called `web-app-demo-1` and three different app service plans, all under the same resource group `app-services`:
- app-service-1 (North Europe, Free)
- app-service-2-we (West Europe, Free)
- app-service-3-plus (North Europe, Basic B1)
Initially, the `web-app-demo-1` is hosted in `app-service-1`
To change app service plan, you need scroll to App Service Plan section in web app’s blade and click on “Change App Service plan” option:
The App Service plan selector opens and you can select the app service you want to transfer your app to. Note that the app-service-2-we is not available in the app service selector as it is hosted in a different geographical location.
Notes
One thing you should keep in mind when moving apps between app service plans is that, although the change happens very fast, it usually takes some time to free up resources from the previous app service plan.
For example, if you have a web app in app service plan A and move it to app service plan B, you may need to wait a few minutes to delete the app service plan A, although the app service plan A looks empty in the Azure Portal.
Thanks for the article! I can’t believe the option was sitting there in front of my face and I never found it.
Has anyone figured out how to do this via script? (PowerShell, CLI, etc)
You can use the following powershell command to move a web app
====
Set-AzureRmWebApp -Name ‘webapp_name’ -ResourceGroupName ‘resource_group_name’ -AppServicePlan ‘new_app_service_plan’
====
or a web app slot
====
Set-AzureRmWebAppSlot -Name ‘webapp_name’ -Slot ‘slot_name’ -ResourceGroupName ‘resource_group_name’ -AppServicePlan ‘new_app_service_plan’
====
What if I want to move it to a different geographical location?
Moving web apps to App Service plans that are in datacenters in different geographical locations is not supported. If you want to move your Web app to a different location you can use the “Clone App” feature, more info here, where you can clone your app to an app service in a different location. Keep in mind that this feature is offered in Premium App Service plan, so you firstly need to scale up your existing App Service plan.
You are also only able to Move or Clone to an ASP in the same Resource Group, and the target ASP must also be a Premium or better SKU.
What about if my app plans are in different resource groups? I can’t use this method. I cant move the resources because “Cannot move Server Farms: Destination Resource Group already has app service plans in the same region.” Is my only option to create a new web app in the target app plan, and manually move the files by ftp?
Indeed, “Change Service Plan” allows you to move web apps between app servers in the same resource group. However, you can move Azure resources to a new resource group or subscription following this guide and then move a web app to another app service plan.
(Bear in mind the following limitations)
To deploy your web app in your new app service plan, you can select any of the following deployment options, including FTP, GitHub, Dropbox… as described in this guide.
Maybe handy to mention. It can take a few minutes before all de detail information of the app and plan are correctly displayed.
I moved a ‘service app’ to a new ‘service plan’. In the ‘service plan’ apps section, the ‘app service’ was correctly mentioned. But on the ‘service app’ itself the overview displayed the old ‘service plan’. After 10minutes or so the overview details were updated with the correct (new) ‘service plan’
It is not always possible to move an app to another App Service Plan, even when the 2 criteria (same region, same resource group) are met.
According to : https://docs.microsoft.com/en-us/azure/app-service/app-service-plan-manage
They must also be in the same “webspace” or “App Service Environment”, which is not exposed to the user in any way.
Basically, the same region, same resource group criteria must always have been true.
i.e. If they were created in different RGs, they will be in different webspaces, and from then on, even if you move them into the same RG, they will still be in different webspaces and so cannot be moved using the UI… the target App Service Plan just won’t show up in the dropdown.