• Resolved newporter

    (@newporter)


    For a long while I have had a localhost XAMPP install running smoothly in /xampp/htdocs/sitename. I have multi-site set up, so http://localhost/sitename resolves and so do all my http://localhost/sitename/anotherblog.

    Today I wanted to start a new project with a clean install. I unzipped wordpress into /xampp/htdocs/newsite, created a new database wp_newdb in phpmyadmin, and replicated my wp_config file from my original install (changing just three lines)

    define('DB_NAME', 'wp_origdb');
    to
    define('DB_NAME', 'wp_newdb');

    $base = '/sitename/';
    to
    $base = '/newsite/';

    define( 'PATH_CURRENT_SITE', '/sitename/' );
    to
    define( 'PATH_CURRENT_SITE', '/newsite/' );

    Then I ran http://localhost/newsite/wp-admin/install.php which completed successfully.

    At this point, went to http://localhost/newsite but get “Error establishing database connection”.

    Anyone know what my mistake might be? Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter newporter

    (@newporter)

    Resolved by deleting wp-config.php, re-creating a new one from the sample wp-config-sample.php, and re-editing DB_NAME, DB_USER, and DB_PASSWORD. Evidently, the code in the bottom of the wp-config.php file which I had used from my other WordPress install had auto-generated code from setting up multi-site settings. Best this not be in the initial wp-config.php file.

Viewing 1 replies (of 1 total)

The topic ‘2nd localhost wp install db connection problem’ is closed to new replies.