[Yandex Cloud documentation](../../../index.md) > [Tutorials](../../index.md) > Application solutions > Creating a website > WordPress website > [WordPress website using Marketplace](index.md) > Management console

# Creating a WordPress website using the management console

To create and set up a [WordPress website](index.md) using the Yandex Cloud management console:

1. [Get your cloud ready](#before-you-begin).
1. [Create a security group](#create-security-group).
1. [Create a VM for WordPress](#create-vm).
1. [Configure DNS (if you have a domain name)](#configure-dns).
1. [Get credentials for authentication in the web interface](#get-auth-data).
1. [Connect to the WordPress web interface](#connect-wordpress-interface).

If you no longer need the resources you created, [delete them](#clear-out).

## Get your cloud ready {#before-you-begin}

Sign up for Yandex Cloud and create a [billing account](../../../billing/concepts/billing-account.md):
1. Navigate to the [management console](https://console.yandex.cloud) and log in to Yandex Cloud or create a new account.
1. On the **[Yandex Cloud Billing](https://center.yandex.cloud/billing/accounts)** page, make sure you have a billing account linked and it has the `ACTIVE` or `TRIAL_ACTIVE` [status](../../../billing/concepts/billing-account-statuses.md). If you do not have a billing account, [create one](../../../billing/quickstart/index.md) and [link](../../../billing/operations/pin-cloud.md) a cloud to it.

If you have an active billing account, you can create or select a [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) for your infrastructure on the [cloud page](https://console.yandex.cloud/cloud).

[Learn more about clouds and folders here](../../../resource-manager/concepts/resources-hierarchy.md).

Make sure the selected [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) has a [cloud network](../../../vpc/concepts/network.md#network) with a [subnet](../../../vpc/concepts/network.md#subnet) in at least one [availability zone](../../../overview/concepts/geo-scope.md). To do this, select **VPC** on the folder page. If the list contains a network, click its name to see the list of subnets. If the subnets or network you need are not listed, [create them](../../../vpc/quickstart.md).

### Required paid resources {#paid-resources}

The cost of maintaining a WordPress website includes:
* Fee for a continuously running VM (see [Yandex Compute Cloud pricing](../../../compute/pricing.md)).
* Fee for using a dynamic or static [public IP address](../../../vpc/concepts/address.md#public-addresses) (see [Yandex Virtual Private Cloud pricing](../../../vpc/pricing.md)).
* Fee for public DNS queries and [DNS zones](../../../dns/concepts/dns-zone.md) if using [Yandex Cloud DNS](../../../dns/index.md) (see [Cloud DNS pricing](../../../dns/pricing.md)).

## Create a security group {#create-security-group}

To create a [security group](../../../vpc/concepts/security-groups.md):

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select a folder.
  1. Navigate to **Virtual Private Cloud**.
  1. Open the **Security groups** tab.
  1. Click **Create security group**.
  1. Specify the group **Name**: `wordpress`.
  1. Select **Network**.
  1. Under **Rules**, create the following rules using the instructions below the table:

     Traffic<br/>direction | Description | Port range | Protocol | Source /<br/>Destination name | CIDR blocks
     --- | --- | --- | --- | --- | ---
     Outbound | `any` | `All` | `Any` | `CIDR` | `0.0.0.0/0`
     Inbound  | `ext-http` | `80` | `TCP` | `CIDR` | `0.0.0.0/0`
     Inbound  | `ext-https` | `443` | `TCP` | `CIDR` | `0.0.0.0/0`
     Inbound  | `ext-ssh` | `22` | `TCP` | `CIDR` | `0.0.0.0/0`

     1. Select the **Egress** or **Ingress** tab.
     1. Click **Add**.
     1. In the **Port range** window that opens, specify the port to receive traffic. Do not indicate anything for outgoing traffic.
     1. In the **Protocol** field, specify the required protocol. For outgoing traffic, leave `Any` to allow traffic over all protocols.
     1. In the **Destination name** or **Source** field, select `CIDR` for the rule to apply to a range of IP addresses. In the **CIDR blocks** field, enter `0.0.0.0`; in the list after **/**, select `0`.
     1. Click **Save**. Repeat these steps to create all rules from the table.
  1. Click **Save**.

{% endlist %}

## Create a VM for WordPress {#create-vm}

To create a VM:

{% list tabs group=instructions %}

- Management console {#console}

  1. On the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) dashboard in the [management console](https://console.yandex.cloud), click ![plus](../../../_assets/console-icons/plus.svg) **Create resource** and select `Virtual machine instance`.
  1. Under **Boot disk image**, in the **Product search** field, enter `WordPress` and select a public [WordPress](https://yandex.cloud/en/marketplace/products/yc/wordpress) image.
  1. Under **Location**, select an [availability zone](../../../overview/concepts/geo-scope.md) where your VM will reside. If you are not sure which availability zone you need, leave the default selection.
  1. Under **Computing resources**, navigate to the `Custom` tab and specify the [platform](../../../compute/concepts/vm-platforms.md), number of vCPUs, and amount of RAM:

      * **Platform**: `Intel Ice Lake`.
      * **vCPU**: `2`.
      * **Guaranteed vCPU performance**: `20%`.
      * **RAM**: `1 GB`.

  1. Under **Network settings**:

      * In the **Subnet** field, select the network where you created the `wordpress` security group and the [subnet](../../../vpc/concepts/network.md#subnet) to connect your VM to. If you do not have a subnet, [create](../../../vpc/operations/subnet-create.md) one.
      * In the **Public IP address** field, select a static IP address from the list, or leave `Auto` to assign your VM a random external IP address from the Yandex Cloud pool.
      * In the **Security groups** field, select the `wordpress` security group.

  1. Under **Access**, select **SSH key** and specify the VM access data:

      * In the **Login** field, enter a username. Do not use `root` or other reserved usernames. For operations requiring root privileges, use the `sudo` command.
      * In the **SSH key** field, select the SSH key saved in your [organization user](../../../organization/concepts/membership.md) profile.
        
        If there are no SSH keys in your profile or you want to add a new key:
        
        1. Click **Add key**.
        1. Enter a name for the SSH key.
        1. Select one of the following:
        
            * `Enter manually`: Paste the contents of the public SSH key. You need to [create](../../../compute/operations/vm-connect/ssh.md#creating-ssh-keys) an SSH key pair on your own.
            * `Load from file`: Upload the public part of the SSH key. You need to create an SSH key pair on your own.
            * `Generate key`: Automatically create an SSH key pair.
            
              When adding a new SSH key, an archive containing the key pair will be created and downloaded. In Linux or macOS-based operating systems, unpack the archive to the `/home/<user_name>/.ssh` directory. In Windows, unpack the archive to the `C:\Users\<user_name>/.ssh` directory. You do not need additionally enter the public key in the management console.
        
        1. Click **Add**.
        
        The system will add the SSH key to your organization user profile. If the organization has [disabled](../../../organization/operations/os-login-access.md) the ability for users to add SSH keys to their profiles, the added public SSH key will only be saved in the user profile inside the newly created resource.

  1. Under **General information**, specify the VM name: `wordpress`.
  1. Click **Create VM**.

  It may take a few minutes to create your VM. When the VM status changes to `RUNNING`, you can start configuring your website.

  Once created, the VM is assigned an IP address and a [host name (FQDN)](../../../compute/concepts/network.md#hostname). This data can be used when configuring the DNS and SSH access.

{% endlist %}

## Configure the DNS (if you have a domain name) {#configure-dns}

If you have a registered domain name, use the [Yandex Cloud DNS](../../../dns/index.md) service to manage the domain.

The tutorial below describes configuring DNS for the `example.com` domain name.

### Add a DNS zone {#create-dns-zone}

{% list tabs group=instructions %}

- Management console {#console}

   To add a [public DNS zone](../../../dns/concepts/dns-zone.md#public-zones):
   1. Navigate to **Cloud DNS** in the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) where you need to create a [DNS zone](../../../dns/concepts/dns-zone.md).
   1. Click **Create zone**.
   1. Specify the DNS zone settings:
      * **Zone**: `example.com.`. Or specify your registered domain.
      * **Type**: `Public`.
      * **Name**: `example-zone-1`.
   1. Click **Create**.

{% endlist %}

### Add resource records {#create-dns-records}

Create DNS records in the public zone:

{% list tabs group=instructions %}

- Management console {#console}

   1. Under **Network** on the [VM](../../../compute/concepts/vm.md) page in the [management console](https://console.yandex.cloud), find the VM's [public IP address](../../../vpc/concepts/address.md#public-addresses).
   1. Create an [A](../../../dns/concepts/resource-record.md#a) record:
      * Open the **Cloud DNS** section of the folder containing the `example.com` DNS zone.
      * Select the `example.com` DNS zone from the list.
      * Click **Create record**.
      * Specify the record settings:
         * **Name**: Leave empty.
         * **Type**: Leave set to `A`.
         * **Data**: Enter your VM's public address.
         * **TTL (in seconds)** (record time to live): Keep the default value.
      * Click **Create**.
   1. Create a [CNAME](../../../dns/concepts/resource-record.md#cname) record:
      * Select the `example.com` DNS zone from the list.
      * Click **Create record**.
      * Specify the record settings:
         * **Name**: `www`.
         * **Type**: Select `CNAME`.
         * **Data**: Enter `example.com`.
         * **TTL (in seconds)** (record time to live): Keep the default value.
      * Click **Create**.

{% endlist %}

### Delegate the domain name {#delegate-domain}

Delegation is the transfer of authority from the registrar's servers to yours. For a domain, [NS](../../../dns/concepts/resource-record.md#ns) resource records (`ns1.yandexcloud.net` and `ns2.yandexcloud.net`) are created.

To delegate a domain, specify its DNS servers in the registrar's account.

Delegation does not take effect immediately. Internet provider servers normally update records within 24 hours (86,400 seconds). This depends on the TTL value which specifies how long domain records are cached.

You can check domain delegation using [Whois](https://www.reg.com/whois/check_site) or the `dig` utility:

```bash
dig +short NS example.com
```

Result:

```text
ns2.yandexcloud.net.
ns1.yandexcloud.net.
```

## Get credentials for authentication in the web interface {#get-auth-data}

When creating a VM, an administrator account for the web interface is created automatically. To get the authentication credentials:

1. Use SSH to connect to the VM you created:

   ```bash
   ssh <username>@<VM_public_IP_address>
   ```

1. Switch to the `root` account:

   ```bash
   sudo su
   ```

1. Open the file for reading:

   ```bash
   cat root/default_passwords.txt
   ```

1. Copy the username and user password from the `WP_ADMIN_USER` and `WP_ADMIN_PASSWORD` lines.

## Connect to the WordPress web interface {#connect-wordpress-interface}

To connect to the WordPress web interface, do the following:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), go to the VM page, find the VM public IP address under **Network**, and add it to the [type A](../../../dns/concepts/resource-record.md#a) [resource record](../../../dns/concepts/dns-zone.md) you created earlier.
  
     ![add-ssh](../../../_assets/tutorials/wordpress/vm-create-5.png)
  
  1. In your browser, open the WordPress admin panel using the domain name you configured or the VM's address: `http://<domain_name_or_VM_public_address>/wp-admin`.
  1. Enter the username and password you saved earlier.

{% endlist %}

## How to delete the resources you created {#clear-out}

To stop paying for the resources you created:

1. [Delete](../../../compute/operations/vm-control/vm-delete.md) the `wordpress` VM.
1. [Delete](../../../vpc/operations/address-delete.md) the static public IP address if you reserved one for your VM.
1. [Delete](../../../dns/operations/resource-record-delete.md) the DNS records and [delete](../../../dns/operations/zone-delete.md) the DNS zone if you used Cloud DNS.

#### Useful links {#see-also}

* [Creating a WordPress website using Terraform](terraform.md).