Support » Localhost Installs » Can’t view Dashboard in local clone of local site

  • 1) I successfully cloned my live wordpress site to a local site (site “A”) hosted on MAMP. The Dashboard works when I log in to wp-admin (user & pw are same as on the live site)

    2) Then I cloned site A to another local site B, also on MAMP. (Different dB name and prefixes.)

    In the wp-config.php for both sites, I just copied the file from the live site and then changed the values for the local sites to have user and pw both set to “root”, and each has its database name and table prefix set according to how I set up the local databases.

    My main question is: In site B when I log in to wp-admin (again, user & pw are same as on the live site), I get “Sorry, you are not allowed to access this page”.

    I am confused about how to handle passwords, and also wondering if there is something wrong with how I’ve approached cloning one local site to another.

Viewing 4 replies - 1 through 4 (of 4 total)
  • wr

    (@wesyah234)

    I’m not sure how to help without more screenshots showing actual urls, etc, but some things that may help you approach this differently: Try Local By Flywheel (I have no affiliation with them, I’ve just used it a couple of times and it seems to work). The tool creates a local virtual machine (instead of what you’re doing with MAMP), and allows you to clone a live site to local.

    Another option is to use a backup tool like Updraft. That I use a lot for backups and occasionally to clone a site (to get true cloning to work where the cloned site has a different url than the source site you have to pay for it though)

    Hope these suggestions help.

    Hi, thank you for your suggestions. I think I will stick with MAMP for now because it mostly works.

    New question (related) – I did a whole new WordPress local installation in MAMP (with database imported from my live site). To be sure I understand passwords, I created a new database user (user1), and database password (pw1).
    I entered those values in wp-config.php.
    I went into my local site http://localhost:8888/mysite/wp-admin/
    It REJECTED the user/password that I had created.
    But it ACCEPTED my original, live site’s user and password.

    I am completely confused. I assumed that database user & password are the same thing as the admin name & password used to enter admin area. Am I wrong???

    • This reply was modified 8 months, 1 week ago by leifpress.
    • This reply was modified 8 months, 1 week ago by leifpress.
    wr

    (@wesyah234)

    the database username and password are only used in wp-config.php. The username and password you use at the wp-login.php page with a browser is a different one, set from within the “users” screen inside the wordpress admin screens.

    leifpress

    (@leifpress)

    Thank you wr! That all makes sense now.

    I think I have things working well now, with multiple local sites in MAMP (clones of live site).
    I simply use the same admin password as the live site. On each local site I use a new database name which is sufficient to keep them all separate.

    It seems the actual admin password is not stored in the database, instead it is some kind of “key” or “hash” or whatever using MD5. I googled MD5 and found it is really insecure, but whatever, this is not a military site!

    Previously, I thought the database tables for one database vs. another all had to have different prefix (e.g. wp1_ vs. wp2_ etc., and I was making that change via phpMyAdmin, not sure I did that right anyway) but that seems unnecessary, which simplifies things.

    Also, rather than use mySQL queries I do not understand (or worse, also tried simple search-and-replace using BBEdit on the exported .sql file following the cue of someone on the web), I now use Velvet Blues which may be safer.

    Cheers
    Leifpress

    • This reply was modified 8 months ago by leifpress.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t view Dashboard in local clone of local site’ is closed to new replies.