![mamp wordpress error establishing database connection mamp wordpress error establishing database connection](https://i.stack.imgur.com/p2tz0.png)
- Mamp wordpress error establishing database connection how to#
- Mamp wordpress error establishing database connection install#
- Mamp wordpress error establishing database connection code#
- Mamp wordpress error establishing database connection mac#
Mamp wordpress error establishing database connection how to#
Second, we’ll show you how to fix the WordPress Error establishing a database connection message for good.
![mamp wordpress error establishing database connection mamp wordpress error establishing database connection](https://studiok40.com/wp-content/uploads/2019/05/Pasted-into-Using-WP-CLI-to-speed-up-development-1024x193.png)
So you should be able to fix the problem with minimal effort.įirst, we’ll explain a little more about what the Error establishing a database connection WordPress error means and why you might be seeing it. Second, there are some troubleshooting steps that you can take to quickly fix the issue and get your site working again. We’ll talk about this more in a second, but the issue here is that your WordPress site isn’t able to access your data, not that the data doesn’t exist. Even though things look bad now, all of your site’s data should be safe and secure in the database. It can be scary because it seems like your site has completely disappeared and all of your data is gone.įirst – don’t worry. The Error establishing a database connection WordPress error is a somewhat common error that routinely pops up after changing hosts or migrating a WordPress site, though you might see it in other situations, too. Nada :-(ģ.Did you just try to access your WordPress site only to be met by a scary message saying Error establishing a database connection instead of your WordPress site? I stopped the servers, reset the prefs to the alt ports, and then restarted the servers…checked for the site & phpMyAdmin. The sequence was: MAMP was running/servers running. Assuming it is necessary, I did so…and I was no longer able to access my DB via phpMyadmin localhost:3306, nor the WP site localhost:80. IS it actually necessary to change the ports for multiple WP installations on localhost per above, and if so, why?Ģ.
Mamp wordpress error establishing database connection install#
However, now I’d like to install a second local site (and maybe more), so my understanding is I should change the MAMP web & mysql ports to 80 & 3306.ġ. I have a successful local install of a WP site, using the default MAMP ports. Hi there…great article, but did not include a vital piece of info I’m trying to figure out.
![mamp wordpress error establishing database connection mamp wordpress error establishing database connection](https://www.openstream.ch/wp-content/uploads/2013/10/wordpress-powered-by-google-app-engine-662x215.png)
** The name of the database for WordPress */ĭefine('DB_NAME', Database name as you created in step3) Įdit “wp-config.php” file with simple text editor like “TextEdit” and do not use word processors like Pages or Word to avoid the quotes being changed to different style resulting in not able to open your WordPress site.
Mamp wordpress error establishing database connection code#
The code in “wp-config.php” file will be looking something like below: // ** MySQL settings - You can get this info from your web host ** //
Mamp wordpress error establishing database connection mac#
In order to do that, open “htdocs” folder in your Mac and locate “wp-config-sample.php” file. Now that you setup MAMP servers, database and installed WordPress as well and guess what next? You need to connect WordPress installation to the MAMP MySQL database so that WordPress can save your content in that database tables. Step5 – Connect WordPress to Local Database