• Hi,
    I’m a total beginner but I would appreciate if someone explained to me how this works.

    I have installed WordPress locally a few months ago. Now I would like to work on another project using WP. I fired up MAMP (for windows), created a new database, created a new folder in htdocs and copied the unzipped WP installation files there. Went to localhost:8888/folder_name where it asked me for the database name, username, password, host, table prefix. So I filled all these. And from here, it keeps saying Error establishing a database connection.
    By this point, I have not configured the wp-config.php file at all (still have only the wp-config-sample.php). But when I do so, it tells me that I have WP already installed and to log in. But the log in info is the one from my previous project.

    Can someone please explain to me how to have multiple WP projects on my computer?

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey zk433,

    My understanding is you would need to setup virtual hosts in Apache on your local machine to handle the additional site. There are a few steps in the process, and I found a pretty good tutorial walking through everything but the specific virtual host configuration:

    https://john-dugan.com/wamp-vhost-setup/

    Here is a second tutorial showing you how to configure the virtual host in windows now that you have it setup:

    https://foundationphp.com/tutorials/apache_vhosts.php

    Cheers!

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Using the free version ServerPress might be easier than MAMP/WAMP/XAMP

    https://serverpress.com/get-desktopserver/

    Thread Starter Zk

    (@zk433)

    Thank you. I think I didn’t explain myself well, I don’t need the sites to be running simultaneously. I will only run one at the time.

    The way I understand it, all I need to do is to point the MAMP server to the new folder (C:\MAMPS\htdocs\folder. But when I do that, I get the “cannot establish the connection to the database” error.

    Thread Starter Zk

    (@zk433)

    Ok, I kept trying and ended up with a message “You appear to have already installed WordPress. To reinstall please clear your old database tables first.”. Upon some googling, I changed the table’s prefix to another one (_wp1).

    This worked.

    Can someone explain why this is so? I would like to understand for future.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to create a multiple wordpress sites locally’ is closed to new replies.