Support » Fixing WordPress » wp-config setup issues

  • I think this is more of an issue with my wamp setup but here goes.

    Inside my wp-config for my wordpress if I have the /** MySQL hostname */ set to localhost or then i get “Error establishing a database connection” when trying to access my site.
    If I put in (My local network IP address) then everything works fine.

    But I need to use localhost because I connect with different machines on my network. How can I fix this?


Viewing 1 replies (of 1 total)
  • You shouldn’t need to fix anything. If your MAMP server’s address is (static, not dynamic) then that IP and ‘localhost’ are for your purposes equivalent as far as the WordPress (wp-config.php) configuration on that MAMP server is concerned, so long as Apache, PHP, MySQL, and WordPress are all on the same machine (Static IP = They aren’t equivalent if MySQL is on a separate machine from the Apache, PHP, and WordPress parts. If the IP lets you get a connection, I see no reason why other computers on the network can’t access the site. Remember, that address is used by the WordPress software itself, so the connection to the MySQL server is always from the machine with the server running WordPress, and not from the individual machines viewing the site. Hope that makes sense. If it doesn’t work that way, I suspect that you have some networking problems. Have you tried to use the IP and found that other computers on the network cannot connect?

    From the machine running MAMP, does http://localhost take you to MAMP’s web root?

Viewing 1 replies (of 1 total)
  • The topic ‘wp-config setup issues’ is closed to new replies.