Learn The Nature Of Client Side And Server Side In WordPress

Published on September 1 2014

Learn The Nature Of Client Side And Server Side In WordPress

WordPress is a vast arena and digging deep into its aspects expects you to invest a great deal of time and efforts. If you're new to the world of WordPress and are inclined on understanding the ins and outs of the CMS, the first and foremost thing you need to understand is the basic difference between the client-side and server side languages, processes and coding environments. This blog is going to help you with the same. Here, I've covered crucial details that will help you understand the unique role played by client side as well as server side languages used in WordPress.

Jargon you must be familiar with
Before striking the right chord with WordPress, it becomes mandatory for you to acquaint yourself with a few pieces of terminology as mentioned below:

User: this term refers to the person who's inclined on viewing and interacting with webpages via an internet-enabled device such as computer or a smartphone.

Client: this refers to the user's internet browser that's running on his/her device

Server: this refers to the computer(this could be anywhere in the world) where the website under focus is being hosted.

Local: this refers to the environment of the user's device.

Remote: this refers to the environment of the server.

Core WordPress Programming Languages & their individual role

PHP- Considered as the backbone of WordPress, most of the WP software packages, themes and plugins are written in this language.

CSS- As a styling language, CSS allows you to indulge in HTML style in a more flexible and repetitive manner.

MySQL- This is the programming language that structures all WordPress databases. You'll need MySQL queries for communicating with the MySQL database. A majority of WordPress developers are also into the habit of using pre-made PHP functions for writing SQL queries directly.

JavaScript- As a multipurpose programming language, JavaScript is being used for making webpages more interactive and dynamic.

Learn The Nature Of Client Side And Server Side In WordPress

So, how does a web page load in WordPress?

Step 1- The browser asks the server to give back the requested webpage. The URL entered by you tells the client about the site you want to view along with the page/page you want to view on the same. Using a convoluted process, your web browser sends a request called HTTP request to the server where the site is stored. The HTTP request is basically the language computers use for transferring webpages to each other.

Learn The Nature Of Client Side And Server Side In WordPress

Step 2- Initial PHP processing

On receiving the client's HTTP request, server does some initial PHP processing. Moreover, the server also interprets the client's HTTP request for understanding what the client is exactly asking for. The voluminous PHP code written in WordPress is mainly inclined to turn HTTP requests into different types of webpages.

Step 3- Using MySQL queries for retrieving post contents

As the third step, WordPress uses MySQL queries for retrieving post contents and other information stores in the database. MySQL database usually resides on the same server as the one used for the WordPress site, but it can't be accessed without MySQL queries. With MySQL queries, PHP scripts are able to receive the desired database information.

Step 4- Advanced PHP Processing

This is done in order to generate an HTML Page. Here, PHP is being used for processing the retrieved post data into pure HTML Markup. Post its journey to the MySQL database, WordPress becomes familiar with what PHP template to use. There's a usage of theme templates, plugins and other WordPress PHP codebase for processing the retrieved post data into HTML markup.

Learn The Nature Of Client Side And Server Side In WordPress

Step 5- Receiving HTTP Response

After having made its journey to the database and getting fed the resulting posts via PHP files, the server is ready to send the clean HTML document back to your web browser. This is being done using a response written in HTTP, the same language in which the request was being sent.

Step 6- Building the HTTP response into a web page

Once the client(browser) has got the HTML containing the HTTP response, it starts building the result into a webpage. For a majority of websites, browser will require additional resources such as CSS stylesheets, image files, sound files, JavaScript files and web fonts.

So, which of the aforementioned steps represent server-side and which ones represent client-side?

While the steps 2 through 5 represent the server-side, the steps 1,6 and 7 belong to the client side. Well, server-side refers to the environment wherein the server goes through a set of processes wherein it tries to serve a page back to the client(browser) who has requested it. On the other hand, client side refers to the environment that exists once the server has sent back the necessary resources. In all, HTML, CSS and JavaScript/jQuery all represent the client-side.

Wrapping Up

So, that was all about the client-side and server-side in WordPress. I'm sure the details furnished here would've helped you take a closer look at the WordPress coding environments. And it will help you be sure about the migration side, or you can simply hire Wordpress migration service of a reliable company.

Written by Ben Wilson

Repost 0
Comment on this post