Preparing your site for a PHP upgrade

 

Overview

This article explains how to prepare your site before you upgrade the PHP version for it.

Background

It is sometimes necessary to update the version of PHP on your website, which is most often due to a version no longer being supported by php.net. Updating your website's software to be compatible with supported PHP versions is an important step to ensure your website remains stable and secure.

If you know your site is compatible with a newer version of PHP, you can change the PHP version for your site in your DreamHost panel using the instructions in this article.

You can also check the following articles for more information on what PHP versions are currently available at DreamHost and how to update the version of your site:

PHP 8.x

PHP 8.x is a major update from previous PHP versions. Code deprecated in older versions has been removed, so if your code has not been updated specifically for PHP 8.x, there is a greater chance that your site may not function properly when updated.

View the following links for further information on PHP 8.x changes:

PHP migration guides

PHP.net provides guides for updating each major and minor PHP version. See this page for a complete list of these guides.

Can I continue to use an older PHP version?

Yes. If your site fails an automatic PHP upgrade, DreamHost offers PHP Extended Support, which allows you to use an older version and provide more time to correct any issues. See this article for further details.

If you find yourself in a situation that requires changes to your site and your developer isn't available to help, DreamHost's skilled support team may be able to assist you for a small fee. You can find more information about supported services and associated costs in the DreamHost Professional Services article.

How to prepare your website

Keeping your website software up to date is the first step in ensuring ongoing PHP-version compatibility.

WordPress

If you are using WordPress, DreamHost recommends updating WordPress Core, themes, and plugins first before attempting to upgrade PHP.

See this article to learn more about the minimum requirements for your WordPress site.

Other CMS websites

If you are using a different application to run your website, see this article to learn more about various CMS options and their updating instructions. Your application’s official website should list version compatibility information in its system requirements or support section. You can typically find the version you are using within the application’s administrative dashboard on your website.

The following links provide minimum requirements for a few popular CMSes:

Whatever CMS software you are using, DreamHost recommends that you first check to see that it supports the PHP version you wish to upgrade to and then upgrade your CMS software accordingly before updating the PHP version.

Custom site built by a developer

The most common issue with custom sites is outdated code. For example, your site may be using deprecated functions that the newer version of PHP no longer supports. In this case, the site will continue to work, but you may see PHP warnings.

If the function has been removed from the newer versions of PHP, your site may not work properly. You can search for the function at php.net. Each function's page will confirm which versions of PHP still support it.

 

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?