Only Part of the Database Loads into New Site

I created a new site by selecting a zip file with the wp-contents folder and a MySQL file. I have I selected also the PHP version 8, Apache, and MySQL version 8 (but I also tried version 5.7 with the same results). After the site was created, only a very small part of the database was actually imported leaving the Wordpress site to only contain a very limited number of pages. In fact, they were the first pages created on the original site. However, if I go into the local database (AdmimerEvo) and drop all the database tables and then import a copy of the MySQL database file, then all of the tables are added, and the site looks fine. Any idea on what could be causing this issue?

Hi @grzfyf64df89!

I’m glad the manual import is working at least as an alternative for you. Within the site’s files are there any backup files like full site backups or DB backups that were created and stored by a plugin? Sometimes we’ve seen issues with our native imports where these extra backup files confuse the import and will either error it out or load outdated content.

Thanks for responding. I’ll look into this. Another possibility that confuses me is the following: Several years ago, someone as an admin user created about 8 pages for me to get the Website started. Since then, I have created hundreds more. However, when I generated the local site with LocalWP, only first pages, created by the other initial user, show up. The rest, created by me as a different user over the past few years, don’t. It is not until I manually import the database after the initial Local site is created that they appear. Any thoughts on this?

Okay. I’ve deleted some extra backups that were present, but the result was the same: still not all the database tables appeared. However, I believe that you might be write is that there is something in the wp-content folder that is confusing LocalWP not to upload the entire database. Any other suggestions are appreciated.

This again leads to me to believe there might be old backup files stored somewhere in the site. As mentioned we’ve seen similar issues with users who have backup plugins storing old copies of the site or database and then when they go to import it loads old/different content.

Did you do this on the Local site? You’ll want to delete (or offload all of this to storage if you want to save it) from the live site or from your unzipped backup file and then reimport all over again.

Okay. Could old information in a mysql.sql file within the Wordpress wp-content directory contain information that could confuse LocalWP, and thus, not import everything correctly?

Yep, exactly.

Okay. Deleting themysql.sql file in the wp-content folder did the trick. Thanks for nudging in the right direction. Do you by chance have any reference to this issue in the help docs in the community forums? If not, it might be good to have as a reference.

1 Like

Final question: Is the mysql.sql file needed in the wp-contents folder, or can it be safely deleted at some point? In my case, it contains old information, including users that no longer appear in database tables. I mean, what is the difference between the mysql.sql file found in the wp-contents folder (which seems to be a very old file in my case) and the SQL database that you can download via PHPMyAdmin? Sorry for the simple question.

I don’t believe we have this in our public help docs that I can find. I know that we have a mention about it in our internal team document for troubleshooting which obviously does you no good :sweat_smile:

I tried doing some simple searches in the forums but couldn’t find a recent example. I don’t know that it’s necessarily common enough to call out in a help document since most of our guides are about basic troubleshooting and not necessarily a comprehensive list of everything that could happen. The good news is that now that you and I have resolved this here others will be able to find your post and this thread and be able to use it in the future :sunglasses:

That can be deleted, or if you’re worried about deleting it completely you can simply move it to some external storage.

Backup plugins create and generate backups and save them in WP Content like this. So, what likely happened is that whoever was working on the site originally was backing up their work and saving the files in there. These are just copies of the DB however and don’t stay up to date. Your actual database in PHPMyAdmin is the one that’s the current version running with the site.

Many thanks, Nick.

1 Like

Of course! Happy Developing :green_heart:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.