Importing website does not include pages and users

Hi all,

I’m trying to import my website so that I can work on it without having an active internet connection as well as not having to work on my live website.

When I import my .zip file (containing /wp-content/ and local.sql) the import succeeds. But when I try to view the website I am asked to setup WordPress (using their patented 5 min etc etc).

Opening the admin panel, I can find my plugins but nothing else (users, pages, posts, media) seems to be imported.

Anyone any pointers on what I might have done wrong?

@uniqueno-spacesshort
You are trying to import a live site into Local, right?

It can be a problem in the .sql dump you made. Are you exporting all the tables?
Also, be sure to check on wp-config.php if your $table_prefix matches the prefix on the database. The prefix is the word before “_” on the tables name, as in “wp_posts”, “wp_postmeta”.
That causes your wordpress installation to not read the proper tables, so it looks like you don’t have any posts, but they are on the database.

If those doesn’t work, try two things:

  1. Using a plugin like Duplicator, described on this answer on another topic (this is the best solution if you’re new to Wordpress and Local):
  1. Manually install your website, as described in this answer on another topic:

Thanks for your time to answer my query.

in my wp-config.php file I have $table_prefix = 'wp4y_'; wp4y_ being the prefix of the table which has been autogenerated by WP during installation.

Should this be replaced with what I find in my local.sql file?

CREATE DATABASE IF NOT EXISTS `amp09_wp600` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE `amp09_wp600`;

in this case amp09_?


When I replace this in my wp-config,php file, do I have to do anything else (as my sql tables in Adminer are with the generated wp4y_ prefix?

Check if you are exporting all tables at your live wesite, in case you are trying to install it mannually. Also, do you see your posts at the table wp4y_posts? If not, that is an indication that you didn’t export it correctly.

Despite that, I would recommend trying to install with Duplicator, as said in the last comment. It’s a plugin with an easy install that takes care of everything for you, generating a file at the end that you put on the server, run and it migrates the website.

Another thing, where are your site hosted?

PS: That amp90_ might not be a prefix of Wordpress itself, it can be the prefix of a plugin that writes and reads directly from the database, that can be different than Wordpress’s.

Checks to make:

  • Make sure your wp-config.php file matches the database given by local to the new website you created and the $table_prefix you used.

  • Your domain must match the domain you used to have on local, in the backed up site. If not, you can change the domain on local in the “Site Setup” tab or replace it from the own database with Adminer.