PHP 7.4 has been rolled out to all regions and is available for use for both newly created and current websites!
This is the last PHP minor version before PHP 8.0, bringing bug fixes, performance updates as well as some long awaited features! Some highlights:
- Typed properties
- Support for Arrow functions
- Limited return type covariance and argument type contravariance
- Unpack inside array (Spread operator in Array)
- Null coalescing assignment operator (??)
- OPcache preloading
In addition a number of features are deprecated and some background incompatible changes were introduced. You can see the full list of updates and changes in the php-src/UPGRADING document as well as a detailed listing of all 7.4 changes in the official Changelog document.
New provisioned WordPress websites on Pressidium run PHP 7.3 by default, which is currently the lowest WordPress recommended PHP version, but you can easily switch to PHP 7.4 by using our PHP version switcher. We support running different PHP versions for each website and environment.
To switch your PHP runtime version via the Pressidium Dashboard:
- Select the Websites menu option from the Dashboard sidebar.
- Click on your website’s name to navigate to the website overview screen.
- Verify the environment you want to apply the change, Production or Staging by checking out the currently selected environment in the navigation bar.
- Click on the Settings menu.
- Select the desired PHP version from the PHP Engine menu.
- Click Switch to make the change. Changes will take effect in a few minutes.
Note that with the 7.4 release, support for PHP 7.1 is over, and PHP 7.2 will receive only security fixes until Nov 2020, so you should plan a PHP upgrade if your website is running one of those versions. If you are updating from PHP 7.3 you can follow the official guide for migrating to the new 7.4 version.
You can check for potential compatibility problems by using your staging environment to perform a test upgrade first, to identify and fix potential issues before switching the PHP version on the production environment.
Alternatively use our Cloning tool, to create a temporary copy of your WordPress site for testing out the new version.
As always if you have any questions about making this upgrade please feel free to raise a support ticket from within your dashboard.