Creating a WordPress website using the management console
To create and set up a WordPress website using the Yandex Cloud management console:
- Prepare your cloud.
- Create a security group.
- Create a VM for WordPress.
- Configure DNS (if you have a domain name).
- Configure WordPress.
If you no longer need the resources you created, delete them.
Prepare your cloud
Sign up for Yandex Cloud and create a billing account:
- Go to the management console
and log in to Yandex Cloud or create an account if you do not have one yet. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account, create one.
If you have an active billing account, you can go to the cloud page
Learn more about clouds and folders.
Make sure the selected folder has a cloud network with a subnet in at least one availability zone. 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.
Required paid resources
The cost of hosting a website in WordPress includes:
- Fee for a continuously running VM (see Yandex Compute Cloud pricing).
- Fee for using a dynamic or static public IP address (see Yandex Virtual Private Cloud pricing).
- Fee for public DNS queries and DNS zones if using Yandex Cloud DNS (see Cloud DNS pricing).
Create a security group
To create a security group:
-
In the management console
, select Virtual Private Cloud. -
Open the Security groups tab.
-
Click Create group.
-
Enter the name of the group:
wordpress
. -
Select the Network.
-
Under Rules, create the following rules using the instructions below the table:
Traffic
directionDescription Port
rangeProtocol Source/
destination typeSource /
destinationOutgoing any All Any CIDR 0.0.0.0/0 Incoming ext-http 80 TCP CIDR 0.0.0.0/0 Incoming ext-https 443 TCP CIDR 0.0.0.0/0 - Select the Outgoing traffic or Incoming traffic tab.
- Click Add rule.
- In the Port range window that opens, specify the port to receive traffic. Do not indicate anything for outgoing traffic.
- In the Protocol field, specify the required protocol. For outgoing traffic, leave Any to allow traffic over all protocols.
- In the Destination or Source field, select the CIDR, and the rule is applied to a range of IP addresses. In the CIDR bloсks field, enter
0.0.0.0/0
. - Click Save. Repeat the steps to create all the rules from the table.
-
Click Save.
Create a VM for WordPress
To create a VM:
-
On the folder page in the management console
, click Create resource and select Virtual machine. -
In the Name field, enter
wordpress
as the VM name. The naming requirements are as follows:- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
Select an availability zone to place your VM in.
-
Under Image/boot disk selection, click the Cloud Marketplace tab and select WordPress as your public image.
-
Under Computing resources:
- Choose a platform.
- Specify the required number of vCPUs and the amount of RAM.
The minimum configuration is enough for testing:
- Platform: Intel Ice Lake
- vCPU: 2
- Guaranteed vCPU share: 20%
- RAM: 1 GB
-
In Network settings, select the subnet to connect the VM to once it is created.
-
In Public address, select Automatically.
-
In Security group, select the
wordpress
group. -
Specify the VM access data:
-
Enter the username in the Login field.
-
In the SSH key field, paste the contents of the public key file.
You will need to create a key pair for the SSH connection yourself. For more information, see Connecting to a Linux VM via SSH.
-
-
Click Create VM.
It may take a few minutes to create a VM. When the VM's status changes to RUNNING
, you can begin configuring the website.
Once created, the VM is assigned an IP address and a host name (FQDN). This data can be used when configuring the DNS and SSH access.
Configure the DNS (if you have a domain name)
If you have a registered domain name, use the Yandex Cloud DNS service to manage the domain.
The tutorial below describes configuring DNS for the example.com
domain name.
Add a DNS zone
To add a public DNS zone:
Add resource records
Create DNS records in the public zone:
- Under Network on the VM page in the management console
, find the VM's public IP address. - Create an 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.
- Set the record parameters:
- Name: Leave empty.
- Type: Keep
А
as the value. - Data: Enter your VM's public address.
- TTL (in seconds) (record time to live): Keep the default value.
- Click Create.
- Open the Cloud DNS section of the folder containing the
- Create a CNAME record:
- Select the
example.com
DNS zone from the list. - Click Create record.
- Set the record parameters:
- Name:
www
. - Type: Keep
CNAME
as the value. - Data: Enter
example.com
. - TTL (in seconds) (record time to live): Keep the default value.
- Name:
- Click Create.
- Select the
Delegate the domain name
Delegation is the transfer of authority from the registrar's servers to yours. For a domain, NS resource records are created (ns1.yandexcloud.net
and ns2.yandexcloud.net
).
To delegate a domain, specify its DNS servers in the registrar's account.
Delegation does not take effect immediately. It usually takes up to 24 hours (86,400 seconds) for internet service providers to update records. This depends on the TTL value which specifies how long domain records are cached.
You can check domain delegation using Whoisdig
utility:
dig +short NS example.com
Result:
ns2.yandexcloud.net.
ns1.yandexcloud.net.
Configure WordPress
To configure WordPress:
After the wordpress
VM's status changes to RUNNING
, do the following:
-
Under Network on the VM page in the management console
, find the VM's public IP address and enter it in the A resource record you previously created. -
Open the domain name you configured or the VM's address in the browser.
-
Select the language and click Continue.
-
Fill out information to access the website:
- Enter any name for the website (for example,
yc-wordpress
). - Specify the username to be used to log in to the admin panel (for example,
yc-user
). - Enter the password to be used to log in to the admin panel.
- Enter your email address.
- Enter any name for the website (for example,
-
Click Install WordPress.
-
If the installation is successful, click Log in.
-
Log in to the website with the username and password specified in the previous steps. This will open the admin panel where you can start working with your website.
-
Make sure the website is accessible by opening the VM's public IP address in your browser.
How to delete the resources you created
To stop paying for the resources you created:
- Delete the
wordpress
VM. - Delete the static public IP address if you reserved one specifically for this VM.
- Delete the DNS records and delete the DNS zone if you used Cloud DNS.