I think running a Docker container for Wordpress or Joomla installs. If setup correctly with the right folders setup as volumes (i.e. wp-content for WP) and the rest would be part of the docker image. If WP gets corrupted/infected, then starting a brand new image would remove most of the corrupted files.
I won't recommend Docker but something like Ansible can be used to make reproducible servers.