Forums

Can I have more than one local MySql database? (3 posts)

  1. kimknickerbocker
    Member
    Posted 1 year ago #

    I'm trying to build a site on a local server before exporting it to a live domain. I learned to install XAMPP (PC), create a database, and get a WordPress site configured properly so it's showing in my local browser.

    What I'm not clear on is if I need to reference the same 'wordpress' database if I'm doing more than one local build at a time? Or do I need to create a new database for each local site and give each DB a unique name (i.e. not 'wordpress')? Or does XAMPP only recognize a database named 'wordpress'?

    I use Dreamhost so I'm guessing I would create a new database there once I'm ready to export all the files, then change the wp-config.php to redirect to the new database and then go live. But I want to be sure.

  2. James
    Happiness Engineer
    Posted 1 year ago #

    You can change the table prefix in wp-config.php prior to installation to use one database for multiple installations, but I recommend using one database for each installation.

  3. winstonmuller
    Member
    Posted 1 year ago #

    You can have multiple WordPress installations on one XAMPP server. For Apache you need 2 different wordpress folders in htdocs, it doesn’t matter what they're called, i.e. htdocs\blogone, htdocs\blogtwo, all that changes is their address, i.e. 'localhost\blogone', 'localhost\blogtwo'

    The same goes for the databases, as macmanx said, wordpress doesn't care what the database is called, that's why it asks for a database name in the wp-config.php file.

Topic Closed

This topic has been closed to new replies.

About this Topic