SALES: 1-800-867-1380

Upgrade or Downgrade a Web Site

Updated: January 15, 2014

You can upgrade a site to Shared mode or Standard mode, or downgrade a site to Shared mode or Free mode, by issuing an HTTP PUT request and providing a request body.

noteNote
The instance size and instance count for a website are determined by the server farm to which a site belongs. To change these values, you must change the server farm WorkerSize and NumberOfWorkers attributes, respectively. For more information, see Create, Manage, or Delete a Server Farm.

Replace <Subscription-ID>, <WebSpaceName>, and <SiteName> with the corresponding values for your website.

 

Method Request URI HTTP Version

PUT

https://management.core.windows.net/<Subscription-ID>/services/WebSpaces/<WebSpaceName>/sites/<SiteName>

HTTP/1.1

The following table describes required and optional request headers.

 

Request Header Description

x-ms-version

Optional. Specifies the version of the operation to use for this request. If you do not specify a version, the latest version is used. For more information about versioning headers, see API Versioning on the Web Sites Management REST API Reference page.

accept: application/json

Optional. Use this header to receive the response in JSON format.

Content-Length

Required.

Content-Type: application/json; charset=utf-8

Required if the request body is sent in JSON format.

A request body is required for a PUT request that upgrades or downgrades a site.

To upgrade or downgrade a website, you use the Site.ComputeMode and Site.SiteMode attributes. The following table shows how their values combine to produce the Free, Shared, and Standard website modes that appear in the Azure Websites portal.

 

ComputeMode value SiteMode value Website Mode

Shared

Limited

Free

Shared

Basic

Shared

Dedicated

Limited

Standard

Dedicated

Basic

Standard

noteNote
The JSON values for ComputeMode are 0 for Shared and 1 for Dedicated. The JSON values for SiteMode use the text strings listed. The SiteMode value has no effect when ComputeMode is set to Dedicated.

To upgrade a Free or Shared site to Standard mode, use the request body to change ComputeMode to Dedicated and specify a server farm. The server farm must be created first and must be named DefaultServerFarm. To create the server farm, see Create, Manage, or Delete a Server Farm. Currently, only one server farm per datacenter is supported.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ComputeMode>Dedicated</ComputeMode>
  <ServerFarm>DefaultServerFarm</ServerFarm>
</Site>

To downgrade a Standard site to Shared mode, use the following request body to change ComputeMode to Shared and SiteMode to Basic.

CautionCaution
Changing a site’s compute mode to Shared does not delete the server farm for the website. The server farm needs to be deleted separately. For information on how to delete a server farm, see Create, Manage, or Delete a Server Farm.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ComputeMode>Shared</ComputeMode>
  <SiteMode>Basic</SiteMode>
</Site>


noteNote
A website that is downgraded from Standard mode will revert to its previous site mode unless you specify a value for SiteMode. For example, if the site was upgraded from Free mode to Standard mode and you do not specify a value for SiteMode when downgrading the website, the site will revert to Free mode.

To downgrade a site from Standard mode to Free mode, use the following request body to change ComputeMode to Shared and SiteMode to Limited.

<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ComputeMode>Shared</ComputeMode>
  <SiteMode>Limited</SiteMode>
</Site>>

To upgrade a site from Free mode to Shared mode, use the following request body to change SiteMode to Basic.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <SiteMode>Basic</SiteMode>
</Site>

To downgrade a site from Shared mode to Free mode, use the following request body to change SiteMode to Limited.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <SiteMode>Limited</SiteMode>
</Site>

The response includes an HTTP status code, a set of response headers, and a response body.

A successful operation returns status code 200 (OK).

For information about status codes, see Service Management Status and Error Codes.

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies the request made against the Management service.

The following is an example partial JSON response body for the 2012-10-10 version after upgrading a website to Standard mode.


{
    "AdminEnabled": true,
    "AvailabilityState": 0,
    "ComputeMode": 1,
    [...]
    "ServerFarm": "DefaultServerFarm",
    [...]

The following is an example partial JSON response body for the 2012-10-10 version after upgrading or downgrading a website to Shared mode.


{
    "AdminEnabled": true,
    "AvailabilityState": 0,
    "ComputeMode": 0,
    [...]
    "ServerFarm": null,
    "SiteMode": "Basic",
    [...]

The following is an example partial JSON response body for the 2012-10-10 version after downgrading a website to Free mode.


{
    "AdminEnabled": true,
    "AvailabilityState": 0,
    "ComputeMode": 0,
    [...]
    "ServerFarm": null,
    "SiteMode": "Limited",
    [...]



The following is an example partial XML response body for the 2012-10-10 version after upgrading a website to Standard mode.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <AdminEnabled>true</AdminEnabled>
  <AvailabilityState>Normal</AvailabilityState>
  <ComputeMode>Dedicated</ComputeMode>
  [...]
  <ServerFarm>DefaultServerFarm</ServerFarm>
  [...]
</Site>

The following is an example partial XML response body for the 2012-10-10 version after upgrading or downgrading a website to Shared mode.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <AdminEnabled>true</AdminEnabled>
  <AvailabilityState>Normal</AvailabilityState>
  <ComputeMode>Shared</ComputeMode>
  [...]
  <ServerFarm i:nil="true" />
  <SiteMode>Basic</SiteMode>
  [...]
</Site>

The following is an example partial XML response body for the 2012-10-10 version after downgrading a website to Free mode.


<Site xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <AdminEnabled>true</AdminEnabled>
  <AvailabilityState>Normal</AvailabilityState>
  <ComputeMode>Shared</ComputeMode>
  [...]
  <ServerFarm i:nil="true" />
  <SiteMode>Limited</SiteMode>
  [...]
</Site>


For descriptions of the elements in the response body, see the Azure Web Site Property Reference.

Any management certificate associated with the subscription specified by <Subscription-ID> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft