Last Updated: November 9, 2020 | Reading Time: < 1 minutes
I was in the middle of installing a plugin, then this error happened:
Fatal error: Call to undefined function simplexml_load_file
Seems like a PHP package called php-xml is missing in your installation. Here’s how to fix:
Login to your server using terminal, then upgrade all the package:
sudo apt-get update
then,
sudo apt-get upgrade
Now, install php-xml package:
sudo apt-get install php7.4-xml
That’s it and now you can refresh the page affected and the error will be gone.