Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
It’s been 2023, don’t you have a website of your own? Most noobs who don’t understand technology feel very overwhelmed when they think of building a website by themselves. The first reaction is to think about whether they have friends who understand the technology and ask them to help. It’s actually not as difficult as you think to build a fully self-hosted website, especially if you use WordPress. In this article, we will share with you how to quickly get your WordPress website up and running in just 15 minutes.
The content involved in this article is as follows:
Let’s explain in detail how to build your own WordPress website from scratch in 15 minutes.
What is a VPS?
VPS is the abbreviation of Virtual Private Server, that is, a virtual private server. Each VPS host can be assigned an independent public network IP address, independent operating system, independent large space, independent memory, independent CPU resources, independent execution programs, and independent system configuration, etc. To put it simply, a VPS is like a computer you rent, but it can only be operated remotely, and you can use it to do anything.
Why buy a VPS?
Many webmasters have hesitated whether to use a virtual host or a VPS when building a website.
Web hosting is relatively cheap and easy to use, and the theme provider provides additional protection against viruses and attacks. But virtual hosting has its own limitations, such as:
As we said above, a VPS is like a rented remote computer. It has independent CPU and memory resources, and its disk space is much larger than that of a virtual host. Each VPS uses an independent IP. Therefore, we are less limited in the process of building and operating the site, and can achieve personalized needs to a greater extent.
Where can I buy a VPS?
There are many excellent hosting providers in the world. The most familiar and commonly used ones are Bricklayers, Linode, Vultr, DigitalOcean, etc. In the past two years, more and more people use the cloud service platform launched by Google. In this article, we will use Take VPS in Google Cloud Platform as an example.
Log in to the Google Cloud Platform with your Google account and activate your GCP account. For new users, Google still has a free gift of $300, but if you encounter the problem that China cannot be selected when activating the free $300, you can try the solutions in this article.
In the GCP console, click the menu icon in the upper left corner, then click “Compute Engine” – “VM instance” to enter the instance list page.
Click “Create Instance”, on the new page, give your VPS a name, and then configure it. We choose the configuration of the Hong Kong region, 1 core, and 2GB memory. In terms of the system, we take CentOS 7 as an example and choose 20GB hard disk capacity. Although there are various systems to choose from in the system selection, including Windows Server system, if you are only using it to build a website, we do not recommend you to choose the Windows Server system, Windows is still a little heavier than Linux, The stability of Linux is slightly better than that of Windows, and the visual desktop of Windows is hardly used.
These configurations are enough for an ordinary small website, and it is very convenient if the configuration is not enough in the future and needs to be upgraded.
In the firewall section, check both HTTP and HTTPS. Others keep the default and do not change.
Click the “Create” button, just wait a moment, and a remote server host with CentOS 7 pre-installed will be created. The server in the red box is what we just created.
We can see that under the “External IP” column, the newly created host IP is 35.241.120.199, which is the IP temporarily assigned to the host by the system. If your host restarts, the IP will change. So we need to set this IP as the fixed IP of the host.
Click the menu icon in the upper left corner of the page, and click “VPC Network” – “External IP Address” to enter the IP address configuration page.
We can see that “temporary” is written next to the IP address of the newly created host. We click the arrow in the drop-down box, select “Static”, set a corresponding name for the IP in the pop-up dialog box, and click “Reserve”.
At this point, our first step is complete. Next, we need to purchase a domain name and resolve the domain name to this VPS.
If VPS is like a home of your website on the Internet, the IP is the specific address of this home, and the domain name is the alias of the website, which must also be unique on the Internet.
There are many places to buy domain names. For example, Godaddy and name.com are good choices for foreign well-known domain name registrations.
After the domain name is purchased, the domain name can be resolved to the VPS just created.
On the configuration page, fill in www or @ for the host record. If you fill in www, then the URL of your website is www.sample.com, if you fill in @, the URL is sample.com, without the preceding www. You can see which one is more conducive to SEO with www or without www we wrote.
Select A record for the record type, use the default resolution line, fill in the IP obtained after the VPS was created just now for the record value, and don’t care about the TTL of 5 minutes.
Click “OK”, and the domain name will be resolved soon.
WordPress website needs three things to run, namely PHP, Apache/Nginx, and MySQL.
There are many ways to create a website operating environment, some are to compile and install the above three software, some are to use the lamp one-click installation package, etc. Today we are going to introduce another way, using the Appnode server cluster management panel to create a website operating environment. This method is very fast, so this is the main reason why you can set up a WordPress website in 15 minutes.
Open the homepage of the Appnode website, and click the “Install for free now” button, on the configuration page, select “Install the control center, the controlled end, and install the website management at the same time”, and check “Automatically install common website environment software at the same time”, and select Nginx Stable Version, PHP 7.0 and above, MySQL 5.6, check “Install PureFTPd”, as shown in the following figure:
After the selection is made, the command line code will be automatically generated at the bottom of the page. We only need to run this code on the server to help us install all the required software.
Copy the code below and go back to GCP’s VPS list page.
1
|
INSTALL_AGENT=1 INSTALL_APPS=sitemgr INIT_SWAPFILE=1 INSTALL_PKGS= 'nginx-stable,php72,pureftpd,mysql56' bash -c "$(curl -sS http://dl.appnode.com/install.sh)" |
Click the SSH button behind the VPS host to open the SSH connection page in a new window, through which you can directly perform a series of operations on the host, such as installing/uninstalling software, configuring users, modifying permissions, creating folders, etc.
Installing the app node requires system administrator privileges, so first enter
1
|
sudo -i |
Then paste the code you just copied into the window and press Enter to execute it.
During the installation process, the system will ask you some questions, just press Enter to select the default value. The entire installation process will last for 1-2 minutes. When you see the code below, it means the installation is complete.
1
2
3
4
5
6
7
8
9
10
11
|
Complete! >> Starting AppNode Agent service >> AppNode Agent installed successfully! >> Starting AppNode CCenter service >> AppNode CCenter installed successfully! --------------------------------------------------- URL: <a title= "http://35.241.120.199:8888/" href= "http://35.241.120.199:8888/" target= "_blank" rel= "noopener" >http://35.241.120.199:8888/</a> - Admin username: admin - Admin password: JzhwYcd6 -------------------------------------------------- ENJOY YOUR NODE :-) |
Please remember your username and password.
Enter the URL address given above in the browser (in this example: http://35.241.120.199:8888/), and enter the user name and password to log in.
Explanation: Many novice friends left messages saying that they could not open the website. If this happens, it is very likely that your VPS does not open port 8888, and you need to go to the firewall to release the port. And some hosting service providers have global firewall settings, such as Google Cloud Platform and Vultr.
Taking Google Cloud Platform as an example, you need to click the menu icon in the upper left corner of the page in the background, click “VPC Network” – “Firewall Rules” to enter the firewall configuration interface. Allow 8888 or the port number of your choice. I won’t go into details on how to operate it here. There is already a default port in the background, just imitate the existing configuration, and just create a new rule.
After configuring the firewall, it will take effect after a while, and then open the above URL to open it.
Because we are using the free version, you can only create up to 3 websites.
Click “Create Operating Environment”, in the pop-up window, PHP and Nginx have been selected by default, and we will select the MySQL server and Pure-FTPd. MySQL is a database service, which is definitely needed. After FTP is configured, it will be convenient for us to connect to the server through third-party FTP tools for file management in the future.
Click “Next” to check whether all the software is detected successfully.
If everything is ok, go ahead and click Next. In the next interface, give the operating environment a code name, or use the default code name. Click “Create Now” to generate the main directory, start the MySQL database, and check “Automatic Start”.
The database password is empty by default, which is very insecure. Click the “Password Reset” button in the database section to set a password for the root user.
Click “Connection Test”, if it prompts that the test is successful, continue to click “Create Operating Environment”.
Click to start deployment, and start all services, so that a website operating environment is set up.
Now that you have completed the first three steps, it is time to install the WordPress program.
Create a website
Click “Create Website”, enter the domain name you just resolved to the VPS in the main domain name, and keep everything else as default. Remember to check Enable FTP and set a password for FTP.
After everything is ok, click “Create” and deploy the website. As shown in the figure below, our website has been successfully deployed and is running.
Enter your domain name in the browser, and you will see a page automatically generated by Appnode.
Install WordPress
Continue to click the “Building Website Market” label under the “Website Management” directory, select the first WordPress in the opened page, click the “Install” button at the back, and click “Next” all the way until you see the interface of a successful installation.
Configure WordPress
Enter your domain name in the browser to open the website, and you will see the WordPress configuration interface. That’s right, we only need to configure the database again, and your website can be successfully launched.
Click the “Start Now!” button, and enter the database name, database user name, and password that were just generated when creating the website on the next page, so that your WordPress website can successfully connect to the database.
For the security of the website, it is recommended that you change to improve website security, for example, mynewwebsite_.
Click Submit. After the database connection is successful, you can proceed to the basic configuration of the website. Give the website a name, set up an administrator, fill in the contact email, etc.
Next, click “Install WordPress”! If nothing else, you will see the following page.
Click “Login” to enter the WordPress management background!
Your WordPress site is up and running successfully! Say Hi to your new website!
The above is the whole content of this article. I hope that through this article, you can complete the construction of a WordPress website independently. Really very simple.