Enabling php ext-xml?

Try out Step 1:

sudo apt install php-xml

Step 2: Restart apache

Resolved my issue


It looks like you're using ubuntu 16.04 with the ondrej/php ppa to get the latest version of php. In this case, the package names need to match the version of php you're using:

apt-get install php7.2-xml

You can see the different versions available with something like this:

apt-cache search php | grep xml

Depending on your configuration, you may need to prefix the installation command with sudo.