PHP code is what makes WordPress work. A WordPress website stores all its data in a MySQL database. This data includes everything from your blog name and blog post content, to your plugin settings and user profile information. PHP’s job is to get specific information from the database, and piece it together into an HTML web page. For more details on that process, you can see our guide on how WordPress works behind the scenes.
PHP files in WordPress do their work on your web hosting server. So, in simple terms, when someone goes to your website, WordPress accesses the PHP files to get your database information (like your blog post content) to show it to your visitor. That sounds simple enough. However, there’s a little problem. Web browsers don’t read PHP. They read HTML. HTML is a type of scripting language used to create website pages. We refer to HTML as a “client-side” scripting language.
Browsers like Chrome, Firefox, and others are called “clients.” Here, a “client-side” language simply means that web browsers do the work of turning HTML code into what you see on your browser window.