PHP not working after upgrading to OS Mojave
I had the same problem - it's based on mod_userdir exclusion after updating to Mac OS X Mojave. There are a few steps to repair that:


Load the module mod_userdir in /etc/apache2/httpd.conf
At the end of the httpd.conf make sure to load httpd-userdir.conf
In httpd-userdir.conf include a local file in /etc/apache2/users/&lt;username&gt;.conf
Put a directory section into that file, containing the rules for the directory where your webserver files are located:

&lt;Directory "/Users/&lt;myusername&gt;/Sites/"&gt;
    AllowOverride All
    Options Indexes FollowSymLinks
    Require all granted
&lt;/Directory&gt;



This should set you up.