PHP XML library is not installed

I’ve been using Grav with Vagrant and Scotch Box for quite awhile now with no issues. I am now suddenly getting this error when I am trying to view my site. I have the PHP XML library installed. It comes with Scotch box and I have also run phpinfo just to confirm. Does anyone know how I can go about resolving this?

Things that I have done that might have effected this:

  • I did install the vagrant-vbguest plugin for troubleshooting an unrelated issue on a different project. I have uninstalled that plugin.
  • I upgraded Scotch box from 2.5 to 3, I think. I’m not sure how to tell and I don’t really know how I would go about reverting back to 2.5.

This is a problem with Scotch Box:

1 Like

I think this is happening when I delete the cache directory. I’m using the unitegallery plugin and the page is not populating with new images, so I’m trying to delete the cache to see if that helps. How do I fix this since I’ve already deleted it?

I got it working again, I just have to figure out how to properly clear the cache. I can check the docs.


You can read this page:

$ cd ~/webroot/my-grav-project
$ bin/grav clear-cache

Or just touch/save a config file.


I’ve never been able to get the CLI to work, and deleting the files like it says I can do in the docs gives me the PHP XML error. :\

I’ll install the Admin plugin and try to clear it that way.

Most likely the CLI version of PHP is different than the Web Server one, and it lacks php-xml. Clearing through Admin should work.

Thanks for the help. The link you supplied me with cleared everything up after I installed php7.0-xml .