• I posted this question a while back, esmi is the only one who responded, and her short response still leaves me lost: “Install a second copy in a sub-folder in your localhost root.”

    Alas, maybe I should change my login name to “knucklehead,” but I could surely use more “detailed” help with this issue.

    Questions still abound, so as a reference, this is what I have:
    1. I do not have a live site up; only on WAMP localhost.
    2. A single install of wordpress on WAMP here: C:\wamp\www\wordpress
    3. I access the site with https://localhost/wordpress.
    4. I access the wordpress login page with https://localhost/wordpress/wp-admin.

    Now, via the easiest way possible, I’d like to have a SECOND site—a copy of the one I have—on WAMP.

    This second site is to be a totally separate site based on the one I have, with minor changes to make it work with a different live domain name when I put it up later.

    So, I want two different sites here so I can work on them independently.

    Any information on how to do this with a little more detail than esmi’s original response—or an expansion of her response—would be greatly appreciated.

Viewing 15 replies - 1 through 15 (of 26 total)
  • Just create another subfolder off the Apache document root and install WP there.

    HTH

    PAE

    Moderator cubecolour

    (@numeeja)

    Make a copy of your ‘wordpress’ folder within your localhost & call it ‘wordpress2’

    create a new MySQL database and edit the wp-config.php in your wordpress2 folder to point it at the new database.
    Export the content of the first site and import it into the second.

    You’d access the new one at https://localhost/wordpress2, so log on at https://localhost/wordpress2/wp-admin.

    Thread Starter adhdcelt

    (@adhdcelt)

    Wow!
    Thanks so much folks.

    Just for the record, peredur, do you mean create a folder in the wamp/www/ folder and actually do a “full install” of wordpress from scratch into that folder?

    As for cubecolour, wow; this explanation makes more sense than anything I’ve seen in hours of searching the Net for an answer.

    I’ll get right on this and see what I get.

    Thanks so much to both of you!

    Thread Starter adhdcelt

    (@adhdcelt)

    YIKES!

    1. copied wordpress folder into root and renamed it.
    2. created new database with no tables.
    3. edited wp-config as follows: define(‘DB_NAME’, ‘newdatabase’);
    4. exported first site using Tools/Export in dashboard.
    5. tried login at https://localhost/wordpress2/wp-admin so I could import exported content.
    6. got the dreaded 403 forbidden error.

    I can’t remember what to do here.
    Should I copy the original database info into the newdatabase, or what?

    Yes. Assuming wamp/www is your document root. I thought it was xampp these days and that the document root on Windows was c:\xampp\htdoc but maybe I’m out-of-date.

    I have at least half a dozen installations of WP on my local computer and several more on my laptop.

    Depends what I’m working on.

    HTH

    PAE

    I think the import/export that cubecolor was talking about was a MySQL database import/export. I could be wrong, but that’s what I would have expected.

    You’d do the MySQL import/export via phpmyadmin or whatever client tool you use to administer your databases.

    HTH

    PAE

    Thread Starter adhdcelt

    (@adhdcelt)

    Yeah, peredur: I did that, too.

    Please correct me here if I’m wrong:
    After exporting the original database, and after creating the newdatabase, I can open the newdatabase in phpMyAdmin and “import” the original one into it?

    Is that what happens? If I have the new one open in phpMyAdmin and “import,” does the import go into the new one?

    Also, can I get the same thing by doing this:
    I opened the original in phpMyAdmin and noticed that it can be “copied” into the newdatabase. I tried that, and it works. Would this be the same as importing the original into the new one?

    Yep. Open the new database in phpmyadmin and click on import.

    As for copying, yes, pretty much I guess. I don’t use phpmyadmin very much because I usually have direct server access so I can use a standalone client like MySQL Administrator or MySQL Query Browser depending on what I want to do.

    When you export a database from phpmyadmin it creates a SQL script that recreates all the tables in the database and inserts all the data back into them. The import simply runs this script. It’s pretty much the same as copying the SQL script into the SQL query page and running the query.

    So if a copy does that then yes, a copy would be the same thing.

    HTH

    PAE

    Thread Starter adhdcelt

    (@adhdcelt)

    Thanks, peredur.
    I exported the existing database and imported it into the newdatabase.
    I also “restarted all services” in mySql.
    Went to new login page and attempted login with original wordpress login username and password of original site, and it simply didn’t take the password. No error, just left the login page there for me to try again.

    Should the wordpress login for the new site be the same as the login for the original one if I just did an import of the database?

    Thread Starter adhdcelt

    (@adhdcelt)

    No.
    The login username and password for the original site work fine.
    No problem getting in to the dashboard.

    The problem is the new site: The wordpress login page for the new site with the newdatabase. Even if I wanted to change the password, I can’t get past the login window and into the dashboard where I could change it.

    However, why would the password for the new site be different, or worse still, have gotten changed somehow? All I did was import the original database into the new one.

    I would assume that the login username and password for the new site would be the same as the old one, simply because the original database was imported into the newdatabase. Is this not correct?

    Where are you cubecolour?
    Do you have an opinion on this?

    I’m not suggesting you reset the password for your old site. I’m suggesting you follow one of the suggestions given in the link I gave you for inserting a known value into the MySQL database.

    I’ve no idea why it would be different, but it seems to me that if you put a known value in there you should be able to log in.

    Trying won’t hurt.

    Cheers

    PAE

    Thread Starter adhdcelt

    (@adhdcelt)

    Well, DUH!
    OK, peredur: Now I get it.
    “Trying won’t hurt.”
    Yeah, I didn’t even read past the “admin” fix.
    What an idiot. Just got too much runnin’ through my head on this.

    Anyway, went into phpMyAdmin and reset the password for “User” per instructions in the wordpress codex link you sent.

    Tried login: No Go.
    Tried it without the MD5 thingy in the “Function” field per the instructions. Same result, and I get the same error message on both attempts:

    “ERROR: The password you entered for the username xxxxxxx is incorrect.”
    Ummmmmm…
    So close….

    Thread Starter adhdcelt

    (@adhdcelt)

    Is there some place I may need to reset the password?
    In a file somewhere, maybe?

    Thread Starter adhdcelt

    (@adhdcelt)

    I meant: Some “other” place besides the user database area?

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘How do I set up a second site in a WAMP localhost install?’ is closed to new replies.