PHP upgrade failure troubleshooting

 

Overview

When upgrading the PHP version of your website in the panel, you may see an Unsuccessful message. This article offers you a few troubleshooting tools to help you diagnose and fix any errors.

If your website is using old software or was built a long time ago, now might be a great time to update it, redesign it, or even create a new one. DreamHost's Professional Services may also be able to help with this. See this article for more information.

How to troubleshoot by type of site

The following sections provide specific PHP upgrade troubleshooting steps, depending on the type of software your website uses.

WordPress sites

You can use wp-cli, a command-line tool for running WordPress commands from your server. The following steps test all installed WordPress items with PHP 8.0 and above to see if they are compatible:

  1. Log in to your server via SSH.
  2. Make sure you're in your website directory.
  3. Run the following command:
    [server]$ wp php-compat --php_version=8.0 

    This command may take a few minutes to finish. You can also replace 8.0 with a different PHP version you'd like to test.

All other PHP-based sites

If there is an index.php file in the domain directory, use the following steps to test the site on PHP 8.0:

  1. Log in to your server via SSH.
  2. Make sure you're in your website directory.
  3. Run the following command:
    [server]$ /dh/cgi-system/php80.cgi index.php

    You can replace 80 with a different PHP version you'd like to test. You can also test other .php files using this same command. Most often, the output shows errors pointing to the exact file with outdated code.

CMS software

If your website uses CMS software (such as Joomla or MediaWiki), you can check its version to see if it is compatible with PHP 8. If not, it may need to be manually upgraded.

See this article for links to upgrade instructions and other resources for various third-party software.

PHP and error logs

The following sections show you how to check your website's PHP and general error log.

Checking the PHP log

You can manually enable PHP error logging on your PHP website to catch any errors that may not be recorded by default. See this article for more information.

Checking the error log

You should also check your website's general error log for additional errors. See this article for more information.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?