Support » Fixing WordPress » Moving to new server

  • Hey Guys,

    I followed the moving wordpress to a new server instructions and changed the config.php with new db details. However, I’ve got a major problem that I can’t figure out. The url is being directed to the localhost url which is where it was before and not the new url….how can I fix this?


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

    So you recreated the database on your new server with the same information etc. It doesn’t have to be the same (except for the table prefix) but what you did on the server needs to match what you have in wp-config.php

    Quick check before all of that, in wp-config.php, is this what you have?

    $base = '/';
    // double check $base
    if( $base == 'BASE' )
    	die( 'Problem in wp-config.php - $base is set to BASE when it should be the path like "/" or "/blogs/"! Please fix it!' );


    Check out this plugin for later:


    This is my wp-config file:

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘mydatabase’); // The name of the database
    define(‘DB_USER’, ‘myusername’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘mypassword’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    // Change SECRET_KEY to a unique phrase. You won’t have to remember it later,
    // so make it long and complicated. You can visit
    // to get a phrase generated for you, or just make something up.
    define(‘SECRET_KEY’, ‘put your unique phrase here’); // Change this to a unique phrase.

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-content/languages.
    // For example, install to wp-content/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    define(‘ABSPATH’, dirname(__FILE__).’/’);


    If I don’t use localhost as the host name..what else might it be…the url of the site?

    it’s ok..all fixed….I needed to change the URL in the mysql file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Moving to new server’ is closed to new replies.