Support » Networking WordPress » Migrate multisite project from localhost to web server.

  • I just tried to migrate my multisite project from my local host to the live server using backupbuddy to find out it apparently isn’t supported.

    How should I tackle this?


Viewing 13 replies - 1 through 13 (of 13 total)
  • Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    It isn’t *officially* supported but it should still work. (I’ve tested it myself.)

    You may still have to go through the db and change the URL tho.

    Any idea why after migrating website’s address redirects to the site on my local machine localhost/dcc?

    So weird.

    I think I found it. The multisite options in the wp-config.php file.

    Hopefully this will solve my problem.

    Ok… I have no idea whats going on?

    Everything extracted and the database looks good.

    I made the adjustments to the wp-config.php file and fixed the redirecting issue. However, I am getting the ‘Error establishing database connection’ error. And I know the database info is correct. I went as far as creating a test script as follows that connects no problem.:

    $link = mysqli_connect('localhost', 'dtcc', 'password');
    if (!link)
    	$error = 'Unable to connect to the database server.';
    	include 'error.html.php';
    echo 'Successfully connected to database server.';
    if (!mysqli_set_charset($link, 'utf8'))
    	$error = 'Unable to set database connection encoding.';
    	include 'error.html.php';
    if (!mysqli_select_db($link, 'dtcc'))
    	$error = 'Unable to locate the DTCC database.';
    	include 'error.html.php';
    echo 'Successfuly connected to dtcc database.';

    and my wp-config file looks like this:

    define('DB_NAME', 'dtcc');
    /** MySQL database username */
    define('DB_USER', 'dtcc');
    /** MySQL database password */
    define('DB_PASSWORD', 'password');
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
     * WordPress Database Table prefix.
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
    $table_prefix = 'wp_';
     * WordPress Localized Language, defaults to English.
     * 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', '');
     * For developers: WordPress debugging mode.
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
    define('WP_DEBUG', true);
    // Change default theme
    define('WP_DEFAULT_THEME', 'dccstore');
    /* WordPress Network *****************************************************/
    /** Turn on MultiSite **/
    define('MULTISITE', true);
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', '' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    /* That's all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    Any ideas? Does WordPress not like databases with the same name as the username?

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    that shoudl be fine. Are you certain the webserver uses localhost & those names are correct? Does the user have all permissions on the db?

    Well I have no issues connecting with the test script above using the exact same credentials.

    I really don’t get it…

    I’just gonna remove everything and try clean install of wordpress and see how the server handles it.

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Good plan. (also, is this site for Chatham NB?)

    Negative. It is for Chatham, Ontario.

    Normal install worked fine. It has to be something backup buddy did.

    If I were to manually transfer, should I just:

    1. Transfer all the files
    2. Edit wp-config
    3. Back up the db via phpmyadmin
    4. Perform a search and replace of localhost with new domain
    5. And run edited backup script on new server

    That’s how I used to do regular WordPress sites before I bought backup buddy. Is it the same for multisite projects?

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    # Perform a search and replace of localhost with new domain

    Do that.

    Ok. I can connect to the database after transferring manually.

    However, my new issue can be seen here: (Internal pages not found.)

    My htaccess file is as follows:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    So what do you think? mod rewrite is disabled on the server?

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Either mod_rewrite isn’t enabled on the server or it’s not being allowed to read the htaccess file.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Migrate multisite project from localhost to web server.’ is closed to new replies.