NEWSWORDPRESS GUIDES

Copied Your WordPress Files but Still Missing Pages? Check the Database

Copied your WordPress files but still seeing a fresh install, missing pages, or a database error? Here’s how to find the missing database, restore it safely, and check that the right site came back.

WPress ExtractorWORDPRESS KNOW-HOW, MINUS THE HEADACHE.
◷ 6 MIN READ↗ Nov 25, 2026
Editorial 16-bit pixel art, crisp chunky square pixels on deep navy: a cyan stack of website folders and a warm yellow database cylinder slo
FEATURED IMAGEThe files supply WordPress’s code and media; the database supplies the content and settings that make it your site.
THE DEEP DIVE

No, copying your website files is not enough to restore WordPress. The files give WordPress its code, themes, plugins, and usually its uploaded media. The database holds the posts, pages, users, settings, and records that tell WordPress how those pieces fit together. To bring back the original site, you need both, plus a wp-config.php that points to the restored database. If all you have is a folder of files, look for a separate database export or a host backup before starting a new installation.

What came back when you copied the files?

If your backup includes wp-admin and wp-includes, you have WordPress core files. Look in wp-content for themes, plugins, and usually uploads, although a site may store media elsewhere. The file wp-config.php tells WordPress where to connect and which table prefix to use. It does not contain the database itself. A set of keys is not a copy of the building.

The database holds each page’s content, its publication status and URL slug, and much of the configuration that controls what visitors see. An image file can survive in wp-content/uploads while its Media Library entry is gone. Likewise, having the theme files does not tell WordPress which theme was active or which page was set as the homepage. A shop may also store orders, product data, and plugin settings in the database.

Editorial 16-bit pixel art on a deep navy workbench: close-up of a little lilac configuration card bridging a royal blue staging terminal to
PIXEL NOTES / GUIDEOn staging, importing the tables is only half the job: WordPress must connect to that database and use the matching table prefix.

Find a database backup that belongs with your files

  1. Check what you actually downloaded. Look beside the site folders and in any separate backup downloads for a file such as database.sql or a compressed .sql.gz export. The name can vary. A WordPress export from Tools → Export is usually an XML file for moving content, not a full database backup.
  2. Check the old host’s backup panel. Look for sections labeled Backups, Snapshots, or Databases; the labels and restore options vary. Some hosts back up files and databases separately. If the old site still works, identify its database using wp-config.php, then export it through the host’s database tool. In phpMyAdmin, select that database in the sidebar, open Export, and choose SQL. If the database is shared with another site, confirm which tables belong to yours before exporting.
  3. Check any .wpress archive. A backup created by All-in-One WP Migration may package site files and a database export together. Opening or extracting it with WPress Extractor lets you inspect what is there; it does not import tables or start a website. Encrypted, unsupported, or damaged archives may not open. If the archive is your only backup, keep it untouched and work from a copy.
  4. Compare backup dates. A database export from Tuesday and uploads from Monday may leave Tuesday’s posts pointing to missing images. Prefer files and a database from the same backup run. If you have to mix dates, write down the gap so you know what to check after the restore.

Restore the files and database together on staging

Use a private staging site or a local WordPress environment first. Keep the original backup and preserve any existing destination site before making changes. For a manual restore, use a separate, empty database: importing into one that already contains a site can fail on duplicate tables or overwrite data, depending on what the export contains. The steps below assume a single-site WordPress installation; a multisite network needs its network tables and configuration restored as well.

  1. Put the site files in the staging document root. Find the web root assigned to your staging address in the hosting panel. Check that wp-admin, wp-includes, and wp-content are at the expected level rather than buried in an extra folder created during extraction.
  2. Import the SQL export. Create a staging database and a database user with access to it through your host’s panel. In phpMyAdmin, select the empty database, open Import, choose the export, and submit it. If the upload exceeds the tool’s limit or the import times out, use your host’s database restore option or ask support to import it. A partial import is not a usable restore just because some tables are visible.
  3. Connect the files to the imported tables. In the staging copy of wp-config.php, set DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST to the values supplied by the destination host. Match $table_prefix to the imported table names: if the tables are shop_posts and shop_options, the prefix is shop_.
  4. Handle the address change. If staging uses a different URL, check for WP_HOME and WP_SITEURL overrides in wp-config.php. Also make sure the restored Home and Site URLs suit the staging environment. Prefer your host’s migration tool or a WordPress-aware search-and-replace tool with a dry-run option when updating stored URLs. A blanket SQL text replacement can break serialized settings.

If you choose to restore a .wpress backup through All-in-One WP Migration instead, use the plugin’s Import screen on a disposable staging install and review its overwrite warning before proceeding. Available import options and limits depend on the plugin setup and host. The plugin import and the manual SQL procedure are alternative restore routes, not two chores to do in succession.

Troubleshoot the symptom, not just the last thing you changed

  • “Error establishing a database connection”: Check the four database settings against the hosting panel. Confirm the database user has access to the staging database and that the host value is correct; it is not always localhost.
  • The setup screen or a blank new site appears: Do not finish the installer. Check that WordPress is connected to the intended database, that the import actually completed, and that the prefix matches the restored tables. An installer screen is a clue, not a recovery plan.
  • The site redirects to the old domain: Compare the restored URL settings and configuration overrides with the staging URL. If those match, check host-level redirects and caching. Make sure the browser is still on staging before changing settings.
  • Posts load but images are broken: Open one broken image URL. If it points to the old domain, check URL replacement or media offloading settings. If it points to staging but returns a 404, check for that exact file under the expected upload path.
  • The homepage works but posts return 404: Check Settings → Permalinks and save the existing structure once on staging. If the errors persist, ask the host to check its WordPress rewrite configuration rather than changing the whole URL structure.

Know what counts as a successful restore

Log in, open an older page and a recent post, check the Media Library, and verify the homepage, menus, and any business-critical records against what you expect from the backup date. Test forms or checkout only with staging-safe email and payment settings. If the live site has taken orders or received submissions since the backup, plan how to preserve those newer records before replacing anything.

If you never find a database backup and the original database is no longer accessible, treat the files as salvage. You may be able to reuse uploads, custom themes, or plugin code in a rebuild. You cannot recreate the original pages, accounts, and settings from those files alone.

QUEST COMPLETE.

Nice work. One less WordPress mystery to solve.

← MORE WORDPRESS ARTICLES