What Is PHP and What Is It Used For

Server stack icon

PHP is used to build the pages of a website on the server at the moment someone asks for them, pulling in content from a database and turning it into the HTML a browser can display. It is the language behind WordPress, WooCommerce and many custom business systems, which is why PHP development for business websites sits underneath so much of the commercial web. For a business owner or marketing manager, knowing what PHP does explains why hosting, updates and version numbers matter more than they first appear.

Most explanations of PHP are written for people learning to code. This one is for the people who own the website, pay for its upkeep and need to know whether the software it relies on is being looked after.

What PHP Is in Plain Terms

PHP is an open source programming language designed for building websites whose code runs on the web server rather than in the visitor’s browser. The official PHP manual introduction describes it as a general purpose scripting language suited to web development that can be embedded into HTML. The same page explains that the code is executed on the server, which generates HTML and sends it to the browser.

That last point is the one that matters for a business. A visitor only ever receives the finished page. The instructions that built it, including database queries, login checks and pricing rules, stay on the server where the public cannot read them.

PHP can also run outside a website, for example as a scheduled task that sends a nightly report or tidies a database. Most businesses meet it through their website, which is where it does most of its work.

What Happens on the Server When a Page Loads

When someone opens a page on a PHP website, the server runs PHP code that gathers the right content, assembles it into a page and sends that page back to the browser. The whole exchange takes a fraction of a second and happens every time a page is requested, unless a cached copy is served instead.

Behind the scenes

How a PHP Page Reaches the Browser


  1. A visitor clicks a link or types an address into the browser.

  2. The web server receives the request and hands it to PHP.

  3. PHP reads the page content, menus and settings from the database.

  4. PHP combines that content with the theme templates to build the HTML.

  5. The finished page is sent back and the browser displays it.

This is what makes a website dynamic. A news page can show the latest posts without anyone editing its HTML, a shop can show live stock levels and a logged in customer can see their own order history, all from the same set of templates.

Forms work the same way in reverse. When someone submits an enquiry, PHP receives the data, checks it, stores it and sends any notification emails before showing a thank you page.

Is PHP Used for Frontend or Backend

PHP is a backend language, because it runs on the server and the browser never sees or runs it. The frontend is what the browser handles directly, which is HTML for structure, CSS for design and JavaScript for interactive features on the page.

The two work together on almost every PHP website. PHP decides what content goes into the page and produces the HTML, then the browser applies the CSS and runs any JavaScript once the page arrives. A slow page can therefore be caused by either side, which is worth knowing when a developer or hosting company points at the other one.

What Kinds of Websites and Systems Use PHP

PHP powers the most widely used content management systems, the main open source ecommerce platforms and a large number of custom business applications. According to W3Techs usage statistics, about seven in ten websites whose server side language can be identified use PHP. No other server side language comes close to that share of the web, as the breakdown of how much of the internet runs on PHP shows.

Platform What it is used for Relationship with PHP
WordPress Business websites, content hubs and blogs Written in PHP, along with its themes and plugins
WooCommerce Online shops built on WordPress A WordPress plugin, so it runs on the same PHP version
Drupal Large content websites, often in the public sector Written in PHP with set version requirements for each release
Magento and Adobe Commerce Large ecommerce catalogues Written in PHP with a supported version list for each release
Custom applications Client portals, booking systems and internal tools Built in PHP directly or with a PHP framework

Each platform publishes which PHP versions it supports. WooCommerce lists its needs on its server recommendations page, Drupal keeps a PHP requirements page for each major version and Adobe sets out the PHP versions for every Magento release in its Adobe Commerce system requirements.

Custom work uses PHP as well. Priority Pixels develops websites using a LAMP stack (Linux, Apache, MySQL, PHP). Every website is coded in custom HTML5, CSS3 and PHP, avoiding page builders, as the web development services page explains.

Why Would Anyone Use PHP

WordPress icon

Businesses use PHP because the platforms they want to run are built on it and because it is mature, widely hosted and well understood by developers. Choosing WordPress or WooCommerce means choosing PHP, so for most organisations the language comes with the platform rather than being a separate decision.

Its long history brings practical advantages. Almost every hosting provider supports it, a large pool of developers can maintain it and the project publishes a predictable release and support schedule, which makes upgrades easier to plan. The guide to what is changing in PHP 8.6 shows that schedule at work for the next release.

Being open source also matters. There is no licence to buy for the language itself. A business is also not tied to a single supplier to keep its website running.

There are good reasons to choose other languages for some projects, such as data heavy applications or highly interactive web apps. For content led business websites and online shops, PHP remains the default because of the ecosystem built on it.

Why the PHP Version Your Website Runs Matters

The PHP version matters because each version only receives security fixes for a set period, after which any newly found weakness stays open. The PHP project’s supported versions page explains that each branch gets two years of active support followed by two years of fixes for critical security issues only. After those four years the branch reaches end of life and receives no further updates.

8.1

Reached end of life on 31 December 2025. It no longer receives security fixes.

8.2

Receives critical security fixes only. That support ends on 31 December 2026.

8.3

Receives critical security fixes only. That support ends on 31 December 2027.

Sources are the supported versions page above and the PHP end of life branches list. Both are published by the PHP project.

WordPress adds its own guidance. The WordPress requirements page recommends PHP 8.3 or greater and warns that older versions it still runs on have reached end of life and may expose a website to security vulnerabilities. Websites still on PHP 8.2 should read what happens when PHP 8.2 support ends. The guide to when PHP 8.3 reaches end of life covers the deadline after that.

Moving to a newer version is rarely a single click. Older themes and plugins can rely on code that newer PHP releases have removed, so an upgrade needs testing first. The guide to WordPress PHP compatibility covers what can break and why.

Keeping PHP current is part of routine maintenance rather than a one off project. The WordPress support retainer from Priority Pixels includes managed UK hosting, uptime monitoring, security hardening, malware scanning and PHP version upgrades.

How to Tell Whether Your Website Uses PHP

A website built on WordPress, WooCommerce, Drupal or Magento uses PHP. Several quick checks confirm it and show which version is running. None of them need any coding knowledge.

  • Look at the login address. A WordPress website logs in through a page ending wp-login.php. The .php ending is a direct sign of PHP.
  • Check the WordPress dashboard. The Site Health tool under Tools shows the PHP version in its Info tab.
  • Log in to the hosting control panel. Most hosting accounts show the PHP version and let the account owner see which versions are available.
  • Ask your developer or support provider. They should be able to name the version and its end of life date straight away.

The WordPress documentation on the Site Health screen explains where the server details appear. The same screen flags an outdated PHP version as a security issue, which makes it a useful first check for anyone responsible for a WordPress website.

Tip

Write down the PHP version you find and check it against the supported versions page on php.net. If the security support date has passed or is within the next few months, plan the upgrade now.

Hosting also plays a part in which versions are available. The guide to WordPress server requirements sets out what a server needs to run a WordPress website properly, including the PHP version and extensions.

Some hosting packages still default to an older PHP branch when an account is first set up. Checking the version once a year and again whenever the hosting changes avoids a website drifting onto an unsupported release without anyone noticing.

What PHP Means for the People Who Own the Website

Checklist icon

For a business owner or marketing manager, PHP is the engine that turns a database of content into the pages customers see. It needs looking after like any other part of the business’s software. Nobody outside the development team needs to read or write it, but someone should know which version is running and when its support ends.

Three questions cover most of what matters. Which platform is the website built on, which PHP version does the server run and who is responsible for testing and applying upgrades before support ends?

Clear answers to those questions mean the website keeps receiving security fixes and stays compatible with the platforms it depends on. If the answers are unclear, that is a sign the website’s maintenance needs a named owner. The guide to choosing a WordPress support provider sets out what good ongoing support should include.

FAQs

Can visitors see the PHP code behind a website?

Visitors cannot see the PHP code behind a website. PHP runs on the server and only the finished page is sent to the browser, so a visitor sees the HTML it produced and never the code that produced it. This is one reason PHP is trusted with tasks such as checking logins and reading from a database.

Does every WordPress website run on PHP?

Every WordPress website needs PHP. WordPress itself is written in PHP, as are its themes and plugins, so a WordPress website cannot run without it. The PHP version on the server is set by the hosting, not by WordPress, which is why it needs checking separately from WordPress updates.

Is PHP free to use?

PHP is open source, so there is no licence to buy and it can be used on commercial websites. The ongoing commitment is keeping the server on a supported version and making sure the website’s code works with each new release.

Who decides which PHP version a website runs?

The hosting provider sets the available versions and whoever manages the server or hosting account chooses which one the website uses. On managed WordPress hosting this is usually handled by the support provider after testing the website against the newer version.

Avatar for Paul Clapp Paul Clapp
Co-Founder at Priority Pixels

Paul leads on development and technical SEO at Priority Pixels, bringing over 20 years of experience in web and IT. He specialises in building fast, scalable WordPress websites and shaping SEO strategies that deliver long-term results. He’s also a driving force behind the agency’s push into accessibility and AI-driven optimisation.

Related PHP Insights

PHP guidance from Priority Pixels, from which version a website should run to planning an upgrade that does not break anything.

PHP Upgrade Checklist and How to Test What Breaks
B2B Marketing Agency
Have a project in mind?

Every project starts with a conversation. Ready to have yours?

Get in Touch
Web Design Agency