Before making your wordPress website available on the Internet, you need to understand the operation of a website on the internet environment
How does a WordPress website work on the Internet?
As you have installed WordPress website on localhost by xampp on the previous article, you know that after downloading WordPress source code from https://wordpress.org and place it in your directory localhost, so that you can operate the website later, with the link http://localhost/. Then the wordPress website will be operated by its source code is being executed in localhost and the additional data will be saved to the database that you have created in phpMyAdmin at the installation step of localhost.
This localhost is called the host – where the source code and database is stored.
However, localhost is just a virtual host environment simulated on a personal computer support us run source code to be translated (WordPress uses PHP as an interpreted language ).
And for our website to be freely accessible on the internet, we will need to place the source code and database on a dedicated server connected or hosting . So that people around the world can access to yourwebsite.
The role of host
The host that I’m talking about here is a small data storage space on a large physical server (Dedicated Server), called Shared Host. Each of these host packages will be connected via an IP address and it will be assigned the same directory as localhost. Imagine now that I have my host address is http://123.456.78.9/designthing/ , if I install a WordPress website on the host’s root directory, my website will have an access to http://123.456.78.9/designthing/.
The host can translate PHP code in WordPress source code and render to client, it receive queries from users, saving data to a database, and sending data from the database to the user.
Temporarily, you should understand that the host is a piece of land and your website is a house on that land. Of course, you can build multiple houses on the same property if your host allows it.
The role of domain names
As you have seen, I explained that the host will have an address http://123.456.78.9/designthing/, in which designthing is the username that accesses your host. But in reality, you will need to buy a domain and access it via your domain like designthing.net. Domain name will be responsible for resolving the IP address of the host to be able to access the data on the host (website) through the domain name.
Beside, you need to understand that the domain name is a world-wide-web address like www.yourname.com, where www doesn’t need to be written because you can use a domain name without www, and .com means the name (or extension) of the domain name, you can use many different extensions like .net, .info, .org, .vn, … but I encourage you to choose .com because it common, or if .com doesn’t have a good name then .net is a good choice.