Creating a website in WordPress

To set up a website in WordPress:

  1. Create a VM for WordPress
  2. Set up WordPress
  3. Configure DNS

Before you start

Before creating a VM:

  1. Go to the Yandex.Cloud management console and select the folder where you want to perform the operations.
  2. Make sure the selected folder has a cloud network with a subnet in at least one availability zone. To do this, click Yandex Virtual Private Cloud on the folder page. If the list contains a network, click on its name to see the list of subnets. If the subnets or network you need are not listed, create them.

1. Create a VM for WordPress

To create a VM:

  1. On the folder page of the management console, click Create resource and select Virtual machine.

  2. In the Name field, enter the VM name: wordpress.

    The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum length of the name is 63 characters.

  3. Select the availability zone to locate the VM in.

  4. In the Public images section, click Select. Select the WordPress public image.

  5. In the Computing resources section:

    • Select the platform.
    • Specify the necessary number of vCPUs and amount of RAM.

    The minimum configuration is enough for testing:

    • Platform: Intel Cascade Lake.
    • Guaranteed vCPU fraction: 5%.
    • vCPU: 2.
    • RAM: 1 GB.
  6. In the Network settings section, click Add network.

  7. In the window that opens, select the subnet to connect the VM to when creating it.

  8. In Public address, select Automatically. Click Select.

  9. Specify data required for accessing the VM:

    • Enter the username in the Login field.
    • In the SSH key field, paste the contents of the public key file. You need to create a key pair for SSH connection yourself. For more information, see Connecting to a Linux VM via SSH.
  10. Click Create VM.

Creating the VM may take several minutes. When the VM's status changes to RUNNING, you can begin configuring the website.

When the VM is created, it is assigned a public IP address and hostname (FQDN). This data can be used for SSH access.

2. Set up WordPress

After the wordpress VM's status changes to RUNNING, do the following:

  1. Go to the VM page of the management console. In the Network section, find the VM's public IP address.

  2. Open the VM by entering its address in your browser.

  3. Select the language and click Continue.

  4. Fill out information to access the website:

    1. Enter any name for the website (for example, yc-wordpress).
    2. Specify the username to be used to log in to the admin panel (for example, yc-user).
    3. Enter the password to be used to log in to the admin panel.
    4. Enter your email address.
  5. Click Install WordPress.

  6. If the installation is successful, click Log in.

  7. Log in to the website with the username and password specified in the previous steps. This opens the admin panel, where you can start working with your website.

  8. Make sure the website is accessible by opening the VM's public IP address in your browser.

3. Configure DNS

To link the website to your domain, configure DNS at your registrar as follows:

  • A record: @ subdomain (use the VM's public IP address as the address).
  • CNAME record: www subdomain (use a domain with a dot at the end as the canonical name, like example.com).