Search code examples
wordpressmamp

Changed WordPress Address (URL) and Site Address (URL) when developing site from localhost. Now, error establishing a database connection


Changed WordPress Address (URL) and Site Address (URL) when developing site from localhost.

enter image description here

Now, error establishing a database connection when I go to http://localhost:8888/wp-admin/ and am being denied access to http://localhost:8888/phpMyAdmin/.

enter image description here

And when I try to Start Servers in MAMP I get this error:

Apache couldn't be started because port 8888 is in use by some other software.

enter image description here

It was a stupid mistake I know, is there any way I can fix this?


Solution

  • In order to re-access a WordPress site for which you've mistakenly changed the address and home url, open the database via phpmyadmin or some other database editor, look in the wp_options table, and modify both siteurl and home to be the correct url.