Viewing 3 replies - 1 through 3 (of 3 total)
  • Where are you hosting your web site? What type of hosting control panel does your hosting account have? Is it cPanel (a brand name) or is it a custom one from the hosting provider (like Go Daddy, for example)?

    I couldn’t get into phpMyAdmin

    but then

    said it was unable to find database.

    . So which is it? You have to be able to “get into” phpMyAdmin in order for it to “tell you” anything ??

    Thread Starter hc4zrr324

    (@hc4zrr324)

    haha sorry I’m new to all this lingo so please forgive me for my ignorance. All I want to do is restore my WP site on my local machine. I’m using MAMP. Here’s how the problem started in a step by step:

    after i finished coding/designing my site i…

    1) Logged in to my local blog via localhost:8888/modernfutureLOCAL/wp-admin/ (this is the WP dashboard right?)

    2) Went to the Administration > Settings > General panel.

    3) In the box for WordPress address (URI): changed the address to the new location of my main WordPress core files. (I think I changed this to something like ModernFuture)

    4) In the box for Site address (URL): change the address to the new location, which should match the WordPress (your public site) address (URI). (I think I put in https://www.modernfuture.net but I’m not sure)

    5) Click Save Changes.

    now whenever I go to localhost:8888/modernfutureLOCAL/wp-admin/ it tells me:

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    But if I click on MAMP’s “Open Start Page” button – it takes me to phpmyadmin. I’m guessing this is where I can fix what went wrong but I have no idea what to do. HELP ME PLEASE!!

    The steps you are following are to move your site to a new location, which is why you can no longer access is using MAMP.

    What you are supposed to do now is go to phpMyAdmin from the MAMP Start page and then export the database as it should now have the correct settings for the live site. Unfortunately, according to what you entered, yours does not.

    The WordPress Address (URL) should be: https://www.modernfurniture.net

    …and the same value for the Site Address (URL)

    That said, in order to get access to the MAMP version of your site, do this:

    – open phpMyAdmin from the MAMP start page
    – select your WP database from the left pane (not sure what you named it, but probably wordpress
    – when the list of tables appears in the left pane (or right pane, depending upon how your phpMyAdmin is configured), select the wp-options table
    – find the site url field and edit it so that it reads:
    https://localhost:8888/modernfutureLOCAL (click Go to save)
    – find the home field and enter the same value

    You will now be able to access the local site again.

    I do things a bit differently when going live in that I copy the site over, leaving the local one unchanged so that I can still work on it.

    To do it this way, just export the database, as is, and then make the above edits to the site url and home fields when on the remote live site.

    Once you do that, you also have to edit the wp-config.php on the remote live site to change the values for the database name, user and password as these will invariably be different from the local ones.

    Also, you will need to use a search-and-replace tool such as this plugin:
    https://www.ads-software.com/plugins/velvet-blues-update-urls/

    or

    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ to update the paths to your images, media etc. (I use the latter).But you do this AFTER the site is live on the remote server.

    Nothing to this web dev stuff, eh? LOL ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘changed siteURI & homeURI in MAMP wp-admin & now I'm locked out!’ is closed to new replies.