ZeroToWP

PHP

Quick Definition

PHP is the server-side programming language that WordPress is built with. It processes your WordPress code on the server and generates the HTML pages that visitors see in their browser.

WordPress.org — the entire WordPress platform is built with PHP

What Is PHP?

PHP (PHP: Hypertext Preprocessor) is a server-side scripting language created by Rasmus Lerdorf in 1994. It's the language that WordPress is built with — every line of WordPress core, every theme template file, and most plugins are written in PHP.

Here's how it works: when someone visits your WordPress site, your web server runs PHP code that queries the database, retrieves your content, applies your theme's templates, and generates an HTML page. The visitor's browser receives that HTML — it never sees the PHP code itself.

According to the official WordPress requirements page, WordPress currently recommends PHP 8.3 or greater. The minimum supported version is PHP 7.2.24, but these older versions have reached End of Life and may expose your site to security vulnerabilities.

PHP in Practice

As a WordPress site owner, you don't need to learn PHP — but it helps to know a few things:

  • PHP version matters — newer versions are faster and more secure. PHP 8.3 is significantly faster than PHP 7.4. Most good hosts let you switch PHP versions from your hosting control panel.
  • WordPress 7.0 (scheduled April 2026) will drop support for PHP 7.2 and 7.3, since usage has fallen below 4% of WordPress sites.
  • Key WordPress PHP files:
    • wp-config.php — your site's main configuration file
    • functions.php — your theme's custom functionality file
    • header.php, footer.php, single.php — theme template files
  • PHP errors — if you see a "white screen of death" or error messages mentioning PHP, it usually means a plugin or theme has a code problem.

To check your current PHP version: install the free "Display PHP Version" plugin, or ask your hosting provider. Many hosts show it in the control panel.

Why It Matters

Running an outdated PHP version makes your site slower and less secure. Upgrading from PHP 7.4 to 8.3 alone can improve page generation speed by 20-40%. It's one of the easiest performance wins. Check our speed optimization guide and hosting guide — good hosts always support the latest PHP versions.

Related Terms

Related Articles