Don’t worry. It is not at all complicated as it sounds. Just like we Humans, A web page has a life and death. So, before we take a look at the life cycle of a web page, let’s see what we have in place.
Our imaginary friend named Rahul has launched a WordPress based website showcasing his graphic design talent. He kept his website on an Apache server configured with PHP and MySql Database. Rahul also linked rahul222.com domain name to his web server. Rahul’s web server could be located anywhere in the world. Web hosting company decides server Location.
“Woah! Woah! Stop It. It does sound complicated to me. Apache Server? MySql? I have never heard them before :(“
Don’t worry. Apache is the name of the server. Nothing more. Nginx is the new web server in the market. Both Web servers are open source projects with strong community support. Together, they both serve websites to over 50% of internet users.
Just like how HTML tells the browser how to paint a piece of content to the screen, SQL ( structured query language ) is a language that allows us access and manipulates content in the database. And, MySql is just a custom version of SQL. Simply put, MySQL is a Database Management System.
Matt Mullenweg, the creator of WordPress, chose MySQL over other flavors of SQL like Postgre SQL, MariaDB, etc.
For WordPress to get installed on a web server, PHP and MySQL are mandatory.
Coming back to our Imaginary friend Rahul, he just asked all of us to visit his website for feedback. Forget about feedback; we will use Rahul’s website for exploring the web page life cycle.
- It all starts with you typing Rahul’s website URL into the web browser and hitting enter.
- As soon as you hit enter, Browser checks for the internet connection. If your computer has an internet connection, your computer takes control from the browser and contacts the Domain Name System (DNS) servers and provides them the domain name.
- DNS servers act as a phone directory. They have the IP addresses of all the available web servers in the world and Domain names associated with them. Once they find a match, They provide the matching server IP address to our computer and our computer hands it back to our web browser.
- Once web browser has the IP address of Rahul’s web server, it will send it a request asking for a web page.
- The Web Server receives the URL you entered into the browser along with other request information. It takes a look at the URL and checks if there is a file name in the URL. Since there is no file name in http://rahul222.com, Server gives control to WordPress by giving it the URL.
- WordPress takes a look at the URL and says to the server “Hey since the user is not asking anything specific, I will give you the Home Page”.
- WordPress contacts MySQL database to pull Home Page content and hands over the processed home page to the server and Server sends this home page as a response to the browser.
- Once the browser gets the home page, it goes through it line by line and paints the web page on to the screen.
- The web page life cycle starts as soon as the browser receives a response from the server and ends when the user closes the browser tab or browser itself.
That’s all, nothing complicated.
Having this kind of knowledge will let you understand most of the problems related to websites, web servers and especially WordPress. You may not solve these problems yourself, but at least you won’t get cheated by your web developer.
Alright, the theory ends here. In the next lesson, we will see how to purchase a domain name.