Content Creation - 1440x460

PHP: What is PHP?

PHP is a programming language that powers many of the world’s websites, including those built with WordPress. It helps create the pages people see when they visit a website and can power many kinds of online tools and services.

 

What is PHP?

PHP stands for “PHP: Hypertext Preprocessor”.

When you visit a page that uses PHP, your browser asks the web server for the page.

The server runs the PHP code, which can look up a product’s price, fetch the latest blog posts or work out the current year. It then sends the finished page to your browser as HTML.


Here’s a website heading written two ways, for example:


HTML

<h1>Events in 2026</h1>

Here, the heading will only show Events in 2026 until you edit it.


HTML with PHP

<h1>Events in <?= date('Y') ?></h1>

In this case, PHP has been used to fill in the current year when the server builds the page, so the heading automatically updates to Events in 2027 when the year changes.

 

What is PHP used for?

PHP is used across the web for things like displaying content, processing contact forms, handling logins, managing online shops, and connecting websites to databases. It is used by many websites and platforms.

WordPress is one particularly well-known example. If your site uses WordPress, PHP helps display posts and pages, process forms, and let people sign in. If you run a shop with WooCommerce, it also helps display products and process orders.


How PHP compares with other web languages

Language What it does Where it’s used Example
HTML Gives a web page its structure. Browser Marks up the product name, image and price.
CSS Controls how a web page looks. Browser Sets the button colour and adjusts the layout for phones.
JavaScript Makes pages interactive and can also run on the server. Browser and server Updates the basket total without reloading the page.
PHP Builds pages and handles requests on the server. Server Fetches product details from the database and builds the page in a Woo shop.
Python Powers web apps and processes data on the server. Server Finds matching products when someone searches a shop built with Python.

 

Why does my PHP version matter?

Supported versions of PHP continue to receive security fixes. If your site runs on an older version that is no longer supported, it may be more vulnerable to security problems, so it is worth updating.

Before changing the version, check that your website software, theme, and plugins work with the version you plan to use. It is also sensible to take a full backup first, and make the change during a quieter time so any issue can be spotted quickly.

WordPress currently recommends PHP 8.3 or newer, while noting that older versions may still run but can expose a site to security risks. PHP 8.2 and 8.3 are still receiving security updates, while versions such as PHP 8.1 and earlier have reached end of life.

 

How do I check my PHP version in WordPress?

In your WordPress dashboard, go to Tools → Site Health → Info → Server and look for PHP version. If you use 123 Reg Web Hosting with cPanel, follow our guide to check or change your PHP version.

 

Note: Don’t worry, if you’re using a smart web building tool like Website Builder or Managed Hosting for WordPress, you’ll probably never need to deal with coding languages like PHP directly. It all goes on in the background so you can focus on building your site and running your business.


For more, check out: What is Javascript?

Find your perfect domain name today

Edit Template

In this article

Starting an online business today? It’s easier than it’s ever been. You can get your own domain in a few clicks, have a website live by the afternoon, and, for many business starters,...

Now more than ever, social media is essential for online business success. Studies show that a quarter of UK brands now see socials as their top sales channel, ahead of email marketing and...

Domain forwarding lets you send visitors to your main website, even if they’ve typed in a different address. You can be sure that anyone landing on an old or alternative domain gets directed...

A backup is a saved copy of your website’s files, content, and data. This can include things like your pages, images, emails, and databases. The idea is simple: if something goes wrong, you’ve...