How PHP works

When you open a page on a website built with PHP, the server does not have it ready as a finished file. PHP assembles it at the moment of the request: it loads text, products and prices from the database, adds the logged-in customer's basket and sends the result to the browser as finished HTML. The visitor never sees the PHP code itself.

A large part of the internet runs on PHP. WordPress with WooCommerce is built on it, as is the Laravel framework used for bespoke web applications.

Why the PHP version matters to you as a website owner

PHP keeps evolving, and older versions eventually stop receiving security fixes. Your hosting usually lets you choose which version the website runs on. A newer version has three advantages:

  • Speed: new versions process pages noticeably faster, often without any other change.
  • Security: old versions have known holes that nobody will fix anymore.
  • Compatibility: new versions of plugins and themes eventually stop supporting old PHP.

A real-world example

The website of a car repair garage in Žilina ran on a very old PHP version for years. The owner was afraid that a change would break the site. On a test copy, I checked which plugins did not work with the new version, replaced two with current ones and then switched the live site over. Pages loaded faster and the website could receive updates again.

What to watch out for

Do not switch PHP versions blindly on a Friday evening. An old plugin or a customised theme may stop working with the new version. Make a backup first, test the change on staging and only then deploy it. I keep an eye on the PHP version and plugin compatibility as part of website management.