• Resolved yetiboy

    (@yetiboy)


    I’ve recently moved hosts, and booboo’ed – I backed up the site, but forgot to export the database (I know, unbelievably stupid) and have already told my previous host to wipe my data so there is zero possibility of recovering it from them.

    However, I DO have backups from several years ago – and since I haven’t actually updated the site, all posts are available.

    I’ve followed the following steps:
    1. Installed WordPress. When doing so, I attempted both with using the default database name and prefixes provided by the installer AND tried using the database name and prefix that is found in the .sql backup file.
    2. Attempted viewing site – shows the basic “Hello World” installation.
    3. Import database from .sql backups. When doing so, it adds all of the information to the database but creates duplicates of all the tables. ie. the installation creates a abc3_posts table (abc3 being the default prefix provided by the installer), the import creates another table called abc3_xyz1_posts (xyz1 being the prefix found in the backup).

    So I now have double the number of tables, but only the installer set of data is being shown on the site. The imported posts ARE there – I can see them when I go into abc3_xyz1_posts – but they don’t appear on the site.

    I’m guessing I’m either missing something simple in the installation, or (and I really hope this isn’t the issue) it’s a problem with the age of the .sql file and it just doesn’t import properly with this version of WordPress.

    Can anyone help? I’ve been tearing my hair out trying to figure this out. Thanks!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Check wp-config.php and look at the line that starts $table_prefix. Make sure it matches what’s in the database… based on what you said above, it should be abc3_xyz1_.

    Thread Starter yetiboy

    (@yetiboy)

    All right, thanks for your help Steve.

    I’ve just done what you suggested, and now I get a blank page.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please show your wp-config.php — but XXXX out all the passwords and salts.

    Thread Starter yetiboy

    (@yetiboy)

    
    text/x-generic wp-config.php ( PHP script, ASCII text )
    
    <?php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://codex.www.ads-software.com/Editing_wp-config.php
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'yetiboyc_wrd3');
    
    /** MySQL database username */
    define('DB_USER', 'yetiboyc_wrd3');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'xxxxxxxx');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8mb4');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.www.ads-software.com/secret-key/1.1/salt/ www.ads-software.com secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY',         'xxxx');
    define('SECURE_AUTH_KEY',  'xxxx');
    define('LOGGED_IN_KEY',    'xxxx');
    define('NONCE_KEY',        'xxxx');
    define('AUTH_SALT',        'xxxx');
    define('SECURE_AUTH_SALT', 'xxxx');
    define('LOGGED_IN_SALT',   'xxxx');
    define('NONCE_SALT',       'xxxx');
    
    /**#@-*/
    
    /**
     * 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_';
    
    /**
     * 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.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.www.ads-software.com/Debugging_in_WordPress
     */
    define('WP_DEBUG', false);
    
    /* 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');
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    what did you change there? It does not appear that you changed the table prefix.

    Remove *everything* above the opening <?php.

    Thread Starter yetiboy

    (@yetiboy)

    I actually changed it TO wp_ to match the old table – the default was a random combo of three letters and a number.

    Not sure where that line of text came from above <?php, it showed up when I viewed the file online but isn’t actually in the file when I open it to edit it. I’ll re-post the actual file contents below.

    <?php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://codex.www.ads-software.com/Editing_wp-config.php
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'yetiboyc_wrd3');
    
    /** MySQL database username */
    define('DB_USER', 'yetiboyc_wrd3');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'xxxx');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8mb4');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.www.ads-software.com/secret-key/1.1/salt/ www.ads-software.com secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY',         'xxxx');
    define('SECURE_AUTH_KEY',  'xxxx');
    define('LOGGED_IN_KEY',    'xxxx');
    define('NONCE_KEY',        'xxxx');
    define('AUTH_SALT',        'xxxx');
    define('SECURE_AUTH_SALT', 'xxxx');
    define('LOGGED_IN_SALT',   'xxxx');
    define('NONCE_SALT',       'xxxx');
    
    /**#@-*/
    
    /**
     * 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_';
    
    /**
     * 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.
     *
     * For information on other constants that can be used for debugging,
     * visit the Codex.
     *
     * @link https://codex.www.ads-software.com/Debugging_in_WordPress
     */
    define('WP_DEBUG', false);
    
    /* 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');
    Thread Starter yetiboy

    (@yetiboy)

    Update: I think it may be a theme issue. I chose a theme on install, but it looks like it doesn’t work (great that it was one of 3 possible choices). I just switched to another theme and it works.

    Thanks for the help Steve.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Importing Database – database imports, but nothing imported appears in site’ is closed to new replies.