I have a server running multiple websites (mostly WordPress) and want to separate them from each other so I can give a person access to one site and not the others, and also so any code run on each site cannot access the other sites. I feel as though the answer is in separate user accounts but I'm not sure what to search for to find tutorials.
My current setup is - LEMP Stack on Ubuntu. All sites in their own directory under /var/www/sites/
where everything is owned by www-data. They all share an instance of mysql though with different mysql users for each site. I only have one user for the server who is non root with sudo privileges.