Creating a website in WordPress
This scenario describes how to create and set up a WordPress CMS-based website using a special VM image.
To set up a website in WordPress:
If you no longer need the website, delete the VM with it.
Before you start
Before deploying the server, you need to sign up for Yandex.Cloud and create a billing account:
- Go to the management console. Then log in to Yandex.Cloud or sign up if don't already have an account.
- On the billing page, make sure you linked a billing account, and it has the
ACTIVE
orTRIAL_ACTIVE
status. If you don't have a billing account, create one.
If you have an active billing account, you can create or select a folder to run your VM in from the Yandex.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 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.
Required paid resources
The cost of hosting a website in WordPress includes:
- A fee for a continuously running VM (see Yandex Compute Cloud pricing).
- A fee for using a dynamic or static external IP address (see Yandex Virtual Private Cloud pricing).
Creating 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 the VM name:
wordpress
.- Length — from 3 to 63 characters.
- 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.
-
Select the availability zone to host the VM in.
-
Under Images from Cloud Marketplace, click Select. Select the WordPress public image.
-
Under Computing resources:
- Choose a platform.
- Specify the necessary number of vCPUs and amount of RAM.
The minimum configuration is enough for testing:
- Platform: Intel Cascade Lake.
- vCPU: 2.
- Guaranteed vCPU share: 5%.
- RAM: 1 GB.
-
In the Network settings section, select the subnet to connect the VM to when creating it.
-
In Public address, select Automatically.
-
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 an SSH connection yourself. For details, see Connecting to a Linux VM via SSH.
-
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.
Setting up WordPress
After the wordpress
VM's status changes to RUNNING
, do the following:
-
You can learn the IP address of the VM under Network on the VM page in the management console.
-
Open the VM by entering its address in your 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 opens 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.
Configuring 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, likeexample.com).
How to delete created resources
To stop paying for your deployed server, just delete the wordpress
VM.
If you reserved a static public IP address specifically for this VM:
- Open the Virtual Private Cloud in your folder.
- Go to the IP addresses tab.
- Find the address you need, click , and select Delete.