Why isn't my imported database showing up? install.php pops up and adds new tables to the database

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?

Topic localhost xampp backup migration Wordpress

Category Web


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


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.