Search code examples
phpwordpresswordpress-bedrock

Bedrock with MAMP can't install WordPress


I have MAMP installed on my Mac with MacOS HighSierra 10.13.4. I have ran composer create-project roots/bedrockin my /Applications/MAMP/htdocsfolder.

I have started up my servers via the MAMP UI. When I surf to http://localhost:8888/MAMPI get the MAMP startpage so everything seems to be working fine.

When I go to http://localhost:8888/bedrock I get a list of my files and dirs in my bedrock folder:

Index of /bedrock 
Parent Directory 
.env 
.env.example 
.gitignore  
CHANGELOG.md 
...

This is what my .env file looks like:

DB_NAME=adatabase
DB_USER=auser
DB_PASSWORD=apassword

# Optional variables
# DB_HOST=localhost
# DB_PREFIX=wp_

WP_ENV=development
WP_HOME=http://localhost:8888/bedrock
WP_SITEURL=${WP_HOME}/wp

I am wondering what I am doing wrong since I don't see the WordPress installation page.


Solution

  • It looks like apache, by dint of MAMP's default config, isn't serving from the correct directory for a bedrock project.

    According to the bedrock docs, you should:

    Set your site vhost document root to /path/to/site/web/ (/path/to/site/current/web/ if using deploys)

    So, you'll need to modify your MAMP config to serve this project not from /Applications/MAMP/htdocs/bedrock, but from /Applications/MAMP/htdocs/bedrock/web.