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 a Name for the group:
wordpress
. -
Select Network.
-
Under Rules, create the following rules using the instructions below the table:
Traffic
directionDescription Port
rangeProtocol Source /
target typeSource /
targetOutgoing 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 selectVirtual machine instance
. -
Under Boot disk image, in the Product search field, enter
WordPress
and select a public WordPress image. -
Under Location, select an availability zone to place your VM in. If you do not know which availability zone you need, leave the default one.
-
Under Computing resources, navigate to the
Custom
tab and specify the required platform, number of vCPUs, and the amount of RAM:- Platform:
Intel Ice Lake
. - vCPU:
2
. - Guaranteed vCPU performance:
20%
- RAM:
1 GB
- Platform:
-
Under Network settings:
- In the Subnet field, select the network where you created the
wordpress
security group and the subnet to connect your VM to. If you do not have a subnet, create one. - Under Public IP, keep
Auto
to assign your VM a random external IP address from the Yandex Cloud pool or select a static address from the list if you reserved one in advance. - In the Security groups field, select the
wordpress
security group.
- In the Subnet field, select the network where you created the
-
Under Access, select SSH key and specify the VM access data:
- Under Login, enter the username. Do not use
root
or other names reserved by the OS. To perform operations requiring superuser permissions, use thesudo
command. -
In the SSH key field, select the SSH key saved in your organization user profile.
If there are no saved SSH keys in your profile, or you want to add a new key:
- Click Add key.
- Enter a name for the SSH key.
- Upload or paste the contents of the public key file. You need to create a key pair for the SSH connection to a VM yourself.
- Click Add.
The SSH key will be added to your organization user profile.
If users cannot add SSH keys to their profiles in the organization, the added public SSH key will only be saved to the user profile of the VM being created.
- Under Login, enter the username. Do not use
-
Under General information, specify the VM name:
wordpress
. -
Click Create VM.
It may take a few minutes to create the 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). 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
wordpress
. - 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.