• Hey all, I’ve been stuck on this for a LONG time. So I installed MAMP locally on my computer, and I downloaded the WP zip so I can install WordPress on this server. I followed this guide: https://www.smashingmagazine.com/2011/09/developing-wordpress-locally-with-mamp/

    I checked the database’s name, password, and user.

    define(‘DB_NAME’, ‘wordpress’);

    /** MySQL database username */
    define(‘DB_USER’, ‘root’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘root’);

    The folder name I extracted from the WordPress.zip file, I renamed the folder to wordpress. I extracted that into the htdocs folder provided by MAMP. I typed https://localhost:8888/wordpress/ and it shows nothing but “Error establishing database connection” what do I do?

    I tried every troubleshooting technique and I feel like I’m wasting more time getting this set up than actually developing themes.

    Ben

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you create the database “wordpress” with phpmyadmin?

    If you want to try wordpress local then you can also try DesktopServer – a WordPress-specific XAMP version (https://serverpress.com/get-desktopserver/).

    Dion

    (@diondesigns)

    You also need to set the DB_HOST constant in wp-config.php to the database hostname set up by MAMP.

    – From the MAMP Start Page, select phpMyAdmin from the Tools menu.
    – Click the Databases tab and enter wordpress as the database name then click Create
    – As DionDesign mentions, you need to add localhost as your DB Host.

    The info you need to enter on the Database Connection page of the WP Install is then:

    Database Name: wordpress
    User Name: root
    Password: root
    Database Host: localhost
    Table Prefix: wp_ <<leave as-is>>

    Submit … away you go ??

    Thread Starter benjisea

    (@benjisea)

    Hello Dion and yoga1103, yes I am installing WordPress on my local server in my computer. I have everything ay ok and running. Here are screenshots to see if I’ve done everything right. I got the wordpress database already created in PhpMyAdmin, I got the wordpress.zip file extracted in the htdocs folder for MAMP, I changed the wp-config.php file accordingly. I don’t know what I’m doing wrong.

    View post on imgur.com

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error Establishing Database Connection’ is closed to new replies.