Trouble moving live site to local (3 posts)

  1. wob
    Posted 2 years ago #


    Trying to move a very large install from live environment to local for some modifications.

    I've run this script via cli to replace the occurrences of live site url (site.com) to my local one (site.dev).

    So far, so good.

    But when I try to access access site.dev I get Error establishing a database connection. And when trying to access site.dev/wp-admin I get One or more database tables are unavailable. The database may need to be repaired.

    When attempting to repair the database this pops up

    wp_posts: Table 'database.wp_posts' doesn't exist
    wp_comments: Table 'database.wp_comments' doesn't exist
    wp_links: Table 'database.wp_links' doesn't exist
    wp_options: Table 'database.wp_options' doesn't exist
    wp_postmeta: Table 'database.wp_postmeta' doesn't exist
    wp_terms: Table 'database.wp_terms' doesn't exist
    wp_term_taxonomy: Table 'database.wp_term_taxonomy' doesn't exist
    wp_term_relationships: Table 'database.wp_term_relationships' doesn't exist
    wp_commentmeta: Table 'database.wp_commentmeta' doesn't exist

    These tables are not present in the live enviroment, so why should they be needed for my local install?

    These are the MU specific stuff I have in my wp-config.php

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'site.dev');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('WP_ALLOW_REPAIR', true);

    Really lost here, been struggling for a few days to get this far, and now I'm really stumped.

  2. wob
    Posted 2 years ago #

    So I copied everything from wp_1_posts to wp_posts and now it seems to work, except I get stuck in a loop while trying to log in to the main wp-admin. I can log in to sub blogs though.

  3. So I copied everything from wp_1_posts to wp_posts

    Why did you have a wp_1_posts in the first place? Was this an old WPMU install?

    You'll need to account for that change in wp_options

    You probably have wp_1_user_roles in there, which should now be wp_user_roles


Topic Closed

This topic has been closed to new replies.

About this Topic