About PHP

What is it?

A general purpose scripting language.

"PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. PHP originally stood for Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor". Source: Wikipedia.

PHP powers your website.

Read more: Wikipedia.

 

PHP and the Joomla! CMS

"Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases.

After this two year period of Active Support, each branch is then supported for an additional year for critical security issues only."

Only the most recent versions of PHP receive bug fix and security support from the developer.

The Joomla! Project state:

  • the minimum requirement to run a Joomla! 5 website is PHP 8.1, and
  • recommend using PHP 8.2

with the following PHP Modules selected:

  • json, simplexml, dom, gd, mysqlnd or pgsql.

Note:

If when you switch to PHP 8.2 with the following PHP Modules selected or you switch to PHP 8.1, your website throws an Error 500, try also selecting the following PHP Module:

  • nd_mysqli.

Joomla! 4 CMS websites will run on servers using PHP 7.2.5 or later.

PHP 7 is no longer supported by the developer.

And support for PHP 8 ended in January 2024.

You should therefore only host a Joomla! 4 CMS website on a server running PHP 8.1 or later.

Note:

If when you switch to using PHP 8.1 your website throws an Error 500, try selecting the following PHP Module:

  • nd_mysqli.

Versions of Joomla! which predate Joomla! 4 are no longer supported by The Joomla! Project.

Joomla! 3.5 (and earlier) websites will break if you try to use them with PHP 7 or later.

Joomla! 3.5 (and earlier) websites require using PHP 5.6 or earlier.

PHP 5.6 (and earlier) is no longer supported by the developer.

Users of Joomla! 3.10 (and earlier) should update their website to Joomla! 4 (or later) at the earliest opportunity.

Check whether any 3rd party extensions used by your website are compatible with a version of PHP before changing.

If your website uses a 3rd party extension that is not compatible with either PHP 8.1 or later then use a different extension to avoid increased risk of your website being compromised.

Read more: Supported PHP versions.

 

Joomla! Technical Requirements

You can see which versions of PHP are recommended for use by the Joomla! Project at the following link.

Read more: Joomla! Technical Requirements.

 

Check whether latest PHP release is a Security Fix

Visit the URL below and change the digits to find out whether the PHP version and release used by the server hosting your website is a Bug Fix or a Security Fix.

 

PHP Modules

When switching from one version of PHP to another, you may observe some changes in the available and selected PHP Modules.

Before making any changes, note down the settings for your current version of PHP.

You can do this via the Select PHP Version screen of cPanel.

The button for this function is located in the Software panel of the cPanel Dashboard.

See image below.

In the unlikely event that your website breaks after changing the PHP version used then you should see one or more error messages displayed in the web browser when you try to visit your website.

The message may indicate the need to enable a particular PHP module.

If so then this should be possible via the Select PHP Version screen.

If unable to quickly identify the cause of your website not working, contact your hosting provider's Technical Support for assistance.

The Media Manager will not work in Joomla 4.3 (and later versions) unless a specific PHP extension called:

  • fileinfo

is enabled on the server hosting your website.

If you see an error message similar to the one shown below when using Media Manager then the above extension will need to be enabled if you want to use it (recommended):

  • Error Property 'mime_type' of argument 'item' of event onFetchMediaItems has a wrong item. Valid: string

You can enable the extension yourself via the Select PHP Version screen of the cPanel Dashboard.

If not sure what to do, ask your hosting provider's Technical Support to enable it for you.

 

PHP Benchmarking

Hosting provider KINSTA benchmarked PHP 8.1, 8.2, and 8.3 across 11 Content Management Systems including the Joomla! CMS.

Read more: https://kinsta.com/blog/php-benchmarks/.

With PHP 8.3, they saw an uplift of almost 25% when using PHP 8.3 with a when compared to using PHP 8.1.

Read more: https://kinsta.com/blog/php-benchmarks/#joomla.

 

About PHP

What is it?

A general purpose scripting language.

"PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. PHP originally stood for Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor". Source: Wikipedia.

PHP powers your website.

Read more: Wikipedia.

 

PHP and the Joomla! CMS

"Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases.

After this two year period of Active Support, each branch is then supported for an additional year for critical security issues only."

Only the most recent versions of PHP receive bug fix and security support from the developer.

The Joomla! Project state:

  • the minimum requirement to run a Joomla! 5 website is PHP 8.1, and
  • recommend using PHP 8.2

with the following PHP Modules selected:

  • json, simplexml, dom, gd, mysqlnd or pgsql.

Note:

If when you switch to PHP 8.2 with the following PHP Modules selected or you switch to PHP 8.1, your website throws an Error 500, try also selecting the following PHP Module:

  • nd_mysqli.

Joomla! 4 CMS websites will run on servers using PHP 7.2.5 or later.

PHP 7 is no longer supported by the developer.

And support for PHP 8 ended in January 2024.

You should therefore only host a Joomla! 4 CMS website on a server running PHP 8.1 or later.

Note:

If when you switch to using PHP 8.1 your website throws an Error 500, try selecting the following PHP Module:

  • nd_mysqli.

Versions of Joomla! which predate Joomla! 4 are no longer supported by The Joomla! Project.

Joomla! 3.5 (and earlier) websites will break if you try to use them with PHP 7 or later.

Joomla! 3.5 (and earlier) websites require using PHP 5.6 or earlier.

PHP 5.6 (and earlier) is no longer supported by the developer.

Users of Joomla! 3.10 (and earlier) should update their website to Joomla! 4 (or later) at the earliest opportunity.

Check whether any 3rd party extensions used by your website are compatible with a version of PHP before changing.

If your website uses a 3rd party extension that is not compatible with either PHP 8.1 or later then use a different extension to avoid increased risk of your website being compromised.

Read more: Supported PHP versions.

 

Joomla! Technical Requirements

You can see which versions of PHP are recommended for use by the Joomla! Project at the following link.

Read more: Joomla! Technical Requirements.

 

Check whether latest PHP release is a Security Fix

Visit the URL below and change the digits to find out whether the PHP version and release used by the server hosting your website is a Bug Fix or a Security Fix.

 

PHP Modules

When switching from one version of PHP to another, you may observe some changes in the available and selected PHP Modules.

Before making any changes, note down the settings for your current version of PHP.

You can do this via the Select PHP Version screen of cPanel.

The button for this function is located in the Software panel of the cPanel Dashboard.

See image below.

In the unlikely event that your website breaks after changing the PHP version used then you should see one or more error messages displayed in the web browser when you try to visit your website.

The message may indicate the need to enable a particular PHP module.

If so then this should be possible via the Select PHP Version screen.

If unable to quickly identify the cause of your website not working, contact your hosting provider's Technical Support for assistance.

The Media Manager will not work in Joomla 4.3 (and later versions) unless a specific PHP extension called:

  • fileinfo

is enabled on the server hosting your website.

If you see an error message similar to the one shown below when using Media Manager then the above extension will need to be enabled if you want to use it (recommended):

  • Error Property 'mime_type' of argument 'item' of event onFetchMediaItems has a wrong item. Valid: string

You can enable the extension yourself via the Select PHP Version screen of the cPanel Dashboard.

If not sure what to do, ask your hosting provider's Technical Support to enable it for you.

 

PHP Benchmarking

Hosting provider KINSTA benchmarked PHP 8.1, 8.2, and 8.3 across 11 Content Management Systems including the Joomla! CMS.

Read more: https://kinsta.com/blog/php-benchmarks/.

With PHP 8.3, they saw an uplift of almost 25% when using PHP 8.3 with a when compared to using PHP 8.1.

Read more: https://kinsta.com/blog/php-benchmarks/#joomla.