black friday 2026 label for the hellobar

Get ready for Black Friday! See offers →

Hosting7 min. read

What is PHP (Hypertext Preprocessor)?

Last updated: 2 Nov 2026
Illustration explaining PHP with a code editor, PHP script, database icon, and server-side scripting features.

PHP (Hypertext Preprocessor) is a programming language that runs on the web server, not in your visitor's browser. When someone sends you a message through a contact form, PHP collects what they typed, passes it on and builds the thank-you page. The browser only receives the finished page in HTML, without the PHP code that built it.

PHP is open source and still widely used. Content management systems such as WordPress are built on it, and with one you write and edit your pages in a dashboard without learning PHP. Because of that, many websites depend on PHP, every WordPress website included.

What does PHP stand for?

PHP stands for "PHP: Hypertext Preprocessor". The first word of the name, PHP, is the name itself, which makes it a recursive acronym. With its meaning added in brackets, the name reads PHP (Hypertext Preprocessor).

PHP's meaning has changed since its first version. Rasmus Lerdorf created that version in 1994 as a small set of tools for his online CV, and he called them Personal Home Page Tools. The language got its recursive name with PHP 3.0, when it became a new language that was no longer just for personal pages.

Hypertext is text with links to other pages, like the pages of a website. PHP is a preprocessor because its code runs before the server sends the resulting HTML to the browser.

How does PHP work?

PHP works on the server, before a page reaches your visitor. When someone opens a page of a PHP website, their browser asks the web server for it. The server runs the PHP code in the page and sends back HTML, the code browsers read to show text, images and links.

A static page shows the same content whenever someone opens it, until someone edits the file. A dynamic page built with PHP can change each time it loads. It can show today's date, the products in stock or the name of the person who has just logged in.

A WordPress site, for example, keeps its content in a MariaDB or MySQL database. A database stores your posts, pages and products in an organised way, so your site can find each one when a visitor asks for it. PHP asks the database for what the page needs, such as a blog post or a product, and places it in the HTML.

What is PHP used for?

PHP runs the parts of a website that change for each visitor, such as:

  • Content management systems: WordPress is built on PHP and stores its content in a MySQL or MariaDB database, so the host of a WordPress site should support PHP and one of those databases.
  • Forms: contact forms, sign-ups and booking requests send their details to a PHP script, which checks them and stores or forwards them.
  • Logins and accounts: once someone has logged in, a PHP session remembers that from one page request to the next, so they don't have to log in again on every page.
  • Online shops: while a customer browses your online shop, PHP can store their basket between page requests, so the basket is still there at checkout.
  • Scheduled tasks: a PHP script can also run without a browser, on a timetable, for jobs that need doing every night or every hour.

If your site is built with WordPress, it uses PHP. Web addresses or files that end in .php, such as contact.php, are another sign.

PHP examples

PHP code sits inside the HTML of a page, between the tags <?php and ?>. Everything outside those tags is ordinary HTML. A footer line with the year looks like this:

<p>© <?php echo date("Y"); ?> Your Business Ltd</p>

Because date() uses the current time, the footer always shows the current year, even after New Year.

PHP can do much more than fill in a date. When you log in to your dashboard, your login request goes to the server. PHP checks your details against the database, then builds the dashboard for you.

Why your PHP version matters

Each PHP version is supported for a limited time only. A version gets bug and security fixes for two years after its release, then only fixes for critical security issues for two more. After those four years it reaches end of life and gets no updates at all. A site that stays on it may be open to security holes that never get fixed.

On 21 October 2026 the PHP project released updates for every supported version, from 8.2.35 to 8.5.12, to fix two critical vulnerabilities. They can let an attacker run code on a PHP server without logging in. The PHP Foundation advises everyone who uses PHP to update now. PHP 8.2 is the next to reach end of life: its security support ends on 31 December 2026.

On our hosting you choose the PHP version your site uses, and you can change it at any time. We don't move your site to a new version automatically. You'll find the version each of your domains uses in the PHP options of your hosting plan in the control panel. If your site is still on a version that has reached end of life, we switch on PHP Extended Support automatically. It's a paid add-on, currently for PHP 8.0 and 8.1, that keeps the expired version secure while you update your site. We send you an email about it when one or more of your domains or subdomains use an older PHP version. The add-on stops as soon as you move to a supported version, so updating in time means you don't pay for it.

Which version to choose depends on your site. A WordPress site with regularly updated plugins and themes is usually best on PHP 8.5, the fastest version. If your site has many plugins or a customised theme that isn't kept up to date, PHP 8.3 or 8.4 gives you the broadest compatibility. If you're unsure between those two, choose 8.4, because a newer version stays supported for longer.

How to change your PHP version

Code that doesn't work with the new version can make parts of your site stop working, so get your site ready before you switch. Make a backup of your website before you start, so you can go back if an update breaks something. If your website runs on our web hosting, you prepare your site and change the PHP version in five steps.

  1. Update your website first: WordPress or your other platform, its themes and its plugins.
  2. Log in to your control panel and go to the PHP options of your hosting plan.
  3. Find the domain or subdomain whose PHP version you want to change.
  4. Choose a supported PHP version and confirm the change.
  5. Check your website to make sure everything still works.

If your site doesn't work after the change, switch back to the older version to get it working again. Then fix the problem or ask a developer for help, and once everything is updated, switch to the latest stable PHP version again and check your site.

PHP and MariaDB on our hosting plans

All our web hosting plans include PHP and MariaDB, so you can use WordPress or your own PHP code on any of them. MariaDB is the database on our hosting, and it works well together with PHP. You manage your databases with phpMyAdmin, a tool in your browser for seeing and editing what they store.

Host your PHP website with MariaDB, phpMyAdmin, a daily backup and the PHP version of your choice.

See hosting plans

What is the difference between PHP and JavaScript?

PHP and JavaScript differ in where the code does its work. PHP works on the server and sends a finished page to the browser. Client-side JavaScript works in the visitor's browser after the page has arrived, for things like menus that open when you click them.

If your site still runs on PHP 8.2, plan the move to a newer version before its security support ends. Starting a new website? See our hosting plans and choose a supported PHP version from day one.


Recommended reading

  • hosting
    Hosting6 Nov 2026

    504 Gateway Timeout: what it means and how to fix it

    A 504 Gateway Timeout means a server in between got no answer from the website in time. See whose fault a 504 error is and how to fix it, WordPress included.
  • Illustration showing a website loading faster from cached HTML, images, and CSS instead of requesting them from the server on every visit.
    Hosting4 Aug 2026

    What is website cache?

    What does cache mean? And how to clear your cache? Read the importance of cache and why it's necessary to clear your cache once in a while.
  • Illustration of an SSH terminal securely connecting to a remote server, with a lock symbol representing encrypted remote access.
    Hosting4 Aug 2026

    What is SSH?

    How does SSH work & what does it do? Learn about the history of Secure Shell's predecessor Telnet and how SSH improved our internet security in this article.