How to Fix ‘Call to undefined function simplexml_load_file’

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Last Updated: November 9, 2020 | Reading Time: < 1 minute

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.

Any idea? Fill the comment below

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

More To Explore