1

I imported my live sites SQL backup into Xampp. I have named the new database wordpress and configured wp-config.php with the database name wordpress, user root, empty password.

Then I went to localhost/wordpress and it prompted me to install.php and I entered site name, user, password, e-mail etc. I then logged in and noticed my posts were not there. So I checked the database and there was a new set of tables added. So I selected all of them and dropped them hoping it would activate the backup I have in there. No luck. I went to localhost/wordpress and install.php prompted me for the same info and again created those tables in the database.

I also saw several posts suggesting to delete the index.html in Xampp so I did that and it did nothing.

How do I view the data from the backup I have in the database?

6
  • 1
    you said you see two sets of tables. what is the prefix of the tables you want to use (default is wp_ but may be different). make sure this prefix matches what's defined in your wp-config.php Jan 27, 2015 at 23:58
  • I changed the table prefix in wp-config. The db prefix is wp_fgfg_ so I changed wp-config to reflect that and when I ran install.php it created new tables in the database that have the prefix wp_fgfg without the _ at the end. I did this all on my server and it worked fine and I am doing the same exact thing with XAMPP and it doesn't work. Jan 28, 2015 at 3:55
  • I also changed the urls already in the options table. Do I have to open the DB and do a find and replace and then import it again? I don't assume that is the issue here tho. Jan 28, 2015 at 3:57
  • 1
    change the value in wp-config.php to "wp_fgfg" - no _ on the end. Jan 28, 2015 at 11:45
  • 1
    Did you resolve your issue?
    – mor7ifer
    Feb 5, 2015 at 15:01

2 Answers 2

5

Your issue likely lies somewhere within wp-config.php. You should not need to run any install if your tables already exist, the wp-admin/install.php is only used when no tables are detected with the settings in wp-config.php.

Going through parameter by parameter, I'll give you some idea of what everything is.

DB_NAME is the name of the database that WordPress should access. Make sure this is set to the database that you want to use.

DB_USER and DB_PASSWORD are the login credentials. As you are not getting a database connection error, these are likely correct.

DB_HOST is how WordPress is to connect to the database. Again, no database error likely means this is fine.

Don't worry about DB_CHARSET and DB_COLLATE unless you have specific reasons to change them, it's just database settings.

The last thing you need to worry about is $table_prefix. Based on the comments, my best guess is that this is your issue. If you look at the tables you imported, they should all be named something like wp_posts, wp_options, etc. Whatever the common thread between them is is what you need to set as the prefix. Make sure you set it EXACTLY the same, including the _ if it's on there. WordPress doesn't add anything to this, it just concatenates the table name onto the end of it.

1
  • great point. Keep in mind, the prefix is towards the bottom of the config file! I forgot it! Oct 1, 2020 at 21:38
0

Changing $table_prefix in wp-config.php worked for me (default is wp_).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.