If you’re looking around on the web for information about PHP, you’ll see it’s a “server-side” scripting language. In this example, you can see the PHP code to display your blog name, which is then wrapped in HTML title tags. PHP files can also contain HTML code.Įach PHP tag can retrieve a bit of information from your database. PHP code needs to be wrapped inside the php opening tag. Each of these files makes up a theme’s template hierarchy and displays the different sections of your website. You’ll find files like sidebar.php, header.php, and others. Each of these files contains the code used to perform different actions in WordPress.Ī WordPress theme folder looks very similar. If you have ever opened a WordPress zip file, you’ll see that most of the files are PHP files.įor example, in the screenshot below, you’ll notice file names like wp-config.php, index.php, and lots more. PHP code is contained in files that end in the. For more details on that process, you can see our guide on how WordPress works behind the scenes. PHP’s job is to get specific information from the database, and piece it together into an HTML web page. ![]() This data includes everything from your blog name and blog post content, to your plugin settings and user profile information. A WordPress website stores all its data in a MySQL database. They can’t see the PHP script because it’s only on the hosting server. The visitor then sees the HTML page in their browser. The PHP code runs on the server, and generates an HTML page to send to the visitor. Whenever someone visits your website, their browser contacts your server to request the page. PHP is a server side language, which means that it runs on your web hosting server. Just like WordPress, PHP is also open source. ![]() ![]() WordPress is written using PHP as the scripting language. PHP is a programming and scripting language to create dynamic interactive websites.
0 Comments
Leave a Reply. |