WordPress PHP Fails After Ubuntu 18.04 Update

After you upgrade to 18.04 using the do-release-upgrade command your php (and WordPress) might not be working.

The Upgrade Procedure (16.04 to 18.04 Example)

We’ll assume that you first backed up your system, took a snapshot, etc and then did your basic system updates first:

Then you probably removed any unused packages:

Next you ran the do-release-upgrade command:

It will ask you to keep defaults and most users should probably do that instead of updating config files. Once all of that is done, you’ll reboot. That is when you will get this error:

Fixing the Error

Next, restart apache.

Reload your page and WordPress should be working. The problem is that php7.0 doesn’t exist anymore after the upgrade so you need to tell apache to use php7.2.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.