HOW WORDPRESS WORKS
WordPress is a powerful Content Management System that will give you the ability to publish, edit, modify, organize, delete and maintain your contents all in one central dashboard. It could be a blog, an e-commerce website, an online news platform or a media streaming website. The power of wordpress comes from the fact that it lets you configure how you want to present your content, using theming. And you could customize and optimize your web content using plugins.
Your wordpress website is divided in two main set of components: PHP and MYSQL. These components are using specific set of technologies and are running side by side on the same server.
The first set are the files that are stored on the server filesystem. These files are created using a popular general-purpose scripting language called PHP. The purpose of this scripting language is to fetch data and build web pages so user can see your wordpress website. PHP files get loaded when a user visits your website from a web client (google chrome, firefox, safari, explorer,etc.). They tell your web server (apache, nginx, etc.) exactly what to send back, and then they build out the page. This is the same for your website front-end pages (home, contact, etc.) as your back-end (administration dashboard).
The second set of components of your website is your MYSQL database. It is a technology that store, organize and fetch data. The type of data stored in the database can be user details, posts, articles, pages, comments or information like which plugins are installed, which are active or not. For example when you deactivate a plugin and click save the PHP that is showing you the admin dashboard and the plugins page send the request to the MYSQL database to deactivate the selected plugin. The MYSQL database then stores this choice and when your website is reloaded there are checks in the database to see which plugins should be active.
This is what happens when the client call the home page:
- Client to Web Server: “Please could you serve home page”
- Web Server to PHP: “Could you get the data for the home”
- PHP to MYSQL: “Please fetch the data for the home”
- MYSQL to PHP: “Yes sure, I am sending the data for home”
- PHP to Web Server: “Great, i am adding data to the template home page”
- Web Server to Client: “This is the home with the latest data”