Fix slow PHP mac localhost

It’s probably not slow PHP, just slow routing. Open terminal and type in hostname to get your hostname (example: myhostname.local). Then run sudo nano /etc/hosts and update it as follows:

::1 localhost myhostname.local localhost myhostname.local

If you are using a virtualhost name (such as vhost.local), you can update it as follows:

::1 vhost.local myhostname.local vhost.local myhostname.local

Leave a Reply

Your email address will not be published. Required fields are marked *