• Hi all,

    I’m migrating WordPress to a new server, and as such I have to rename the database… because I can’t control the prefix on the new host.

    Anyway, I’m looking at wp-config.php and it does not have anything like DB_NAME or even anything containing NAME.

    Please advise how I can change this.

    Thanks,

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter themidnighter

    (@themidnighter)

    A little more info, I’m actually receiving the error when I try to load the page on the new server:

    This page isn’t working thewellrounded.coach is currently unable to handle this request.
    HTTP ERROR 500

    and this is just one of the troubleshooting steps I’ve found..

    if you cannot find DB_NAME constant in wp-config.php then look for another included file in wp-config.php some hosting keep the database and salt details in another file.

    and for the 500 error check the error log, there could be an error.

    Thread Starter themidnighter

    (@themidnighter)

    I’m seeing the following includes:

    // Include files required for initialization.
    require( ABSPATH . WPINC . '/load.php' );
    require( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
    require( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
    require( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
    require( ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php' );
    require( ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php' );
    require( ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php' );
    require( ABSPATH . WPINC . '/class-wp-recovery-mode.php' );
    require( ABSPATH . WPINC . '/error-protection.php' );
    require( ABSPATH . WPINC . '/default-constants.php' );
    require_once( ABSPATH . WPINC . '/plugin.php' );

    but I can’t see a DB Name being in any of these. I found a file in the root directory called .env (that’s it, just .env) and it has DB_NAME and a bunch of other info in it, but it’s not referenced or called anywhere…

    I’m at a loss here, I don’t want to have to rebuild the entire site that would be too much but I can’t stay at the current host they’re closing their services down.

    Also, where do I find the logs for these errors? Thanks in advance

    • This reply was modified 3 years, 3 months ago by themidnighter.

    You’re looking in wp-settings.php file you’ll have to look into wp-config.php file.

    it will be better if you can attach the full(top-to-bottom) screenshot of wp-config.php file.

    ( Please blur the Authentication Unique Keys and Salts. values and any other personal information in screenshot )

    You’ll have to define debug constant in wp-config.php file to enable debug log.

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    add these lines before this line
    /* That's all, stop editing! Happy publishing. */

    if constants already exist in the file then adjust the value from my above code, don’t add constants twice.

    then inside wp-content folder you will find debug.log once error are generated.

    Thread Starter themidnighter

    (@themidnighter)

    Okay, I figured that out — the config file was in a different directory for some reason.

    My issue now, is when I load the web page it just shows up blank – no error message, but no visualizations either.

    Is there a log I can look at to see why this might be happening?

    I imported the database, copied all original files over and updated the config so it was looking at the right database… What else could go wrong lol

    Check your .htaccess file.

    Also, try to contact your hosting support to check if you have configured anything wrong.

    Thread Starter themidnighter

    (@themidnighter)

    I don’t have a .htaccess file on this site.. which made me go looking.
    I am going to try and re-upload the files, I noticed there were actually a couple missing. Here’s to hoping that was the issue all along.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Rename Database, except…’ is closed to new replies.