Php not running after updating on ubuntu. what to do?

Sometimes, after updating PHP versions on Ubuntu, the older version might still be active causing conflicts.


PHP 7.x is active but 8.x is installed.


1. Use `update-alternatives` to set the default PHP version.
2. Restart the Apache or Nginx service.

Beginner's Guide to PHP