Search code examples
wordpresswindowsmamp

MAMP on windows won't run WordPress install


I am using MAMP on windows 10, and I'm trying to install WordPress but it gives me "Error establishing a database connection".
It's connected to MySQL okay, as it shows the box checked in the MAMP UI.

I've tried following:

  1. Using 127.0.0.1 instead of localhost.
  2. Adding manual config into the wp-config.php.
  3. Adding define('WP_ALLOW_REPAIR', true);.

Why I am getting this error and how can I resolve it?


Solution

  • After many investigations. turned out I was accessing localhost as a host, but while I reset the MAMP ports to default, it uses 8889 and not 8888 or localhost.