How to Restore Old Backups via SFTP? Print

  • 0

How to Restore Old Backups via SFTP

While the Nixzoehost One-Click Restore tool is the easiest way to handle daily backups, there are times when you need to restore a backup that isn't in our systemsuch as a site migration or an old archive.

A manual restore involves two main parts: Uploading the Files and Importing the Database.


Part 1: Uploading the Files via SFTP

  1. Open your SFTP client (like FileZilla) and connect to your server using Port 22. (See our SFTP Access Guide if you need help connecting).

  2. On the right side (the server), navigate to the public_html folder.

  3. If there are already files in that folder, you should delete them or move them to a "backup" subfolder to ensure a clean slate.

  4. On the left side (your computer), locate your unzipped backup files.

  5. Drag and drop the files from your computer into the public_html folder on the server.

    • Note: Ensure the wp-content, wp-admin, and wp-includes folders are in the root of public_html.


Part 2: Importing the Database via phpMyAdmin

Files are only half the battle; the database contains your posts, users, and settings.

  1. Log in to your Nixzoehost cPanel and open phpMyAdmin.

  2. Select your database from the left sidebar.

  3. If there are existing tables, check "Check all" at the bottom and select "Drop" from the dropdown menu to clear the database (Warning: This deletes existing data).

  4. Click the Import tab at the top.

  5. Click Choose File and select the .sql file from your local backup.

  6. Scroll to the bottom and click Import.


Part 3: Updating wp-config.php

Since you've moved files (possibly from a different server), you must tell WordPress how to talk to your new Nixzoehost database.

  1. In your SFTP client, find the file named wp-config.php in the public_html folder.

  2. Right-click and select Edit.

  3. Look for these lines and update them with your current Nixzoehost database details:

    • DB_NAME: Your current database name.

    • DB_USER: Your database username.

    • DB_PASSWORD: Your database password.

    • DB_HOST: This should almost always be localhost.

  4. Save the file and upload it back to the server.


Common Issues During Manual Restores

Issue Likely Cause Fix
"Error Establishing Database Connection" Wrong details in wp-config.php. Triple-check your database name, user, and password in cPanel and update wp-config.php.
Images are missing The wp-content/uploads folder didn't upload fully or permissions are wrong. Check your SFTP client's "Failed Transfers" tab and re-upload; ensure folder permissions are set to 755.
White Screen of Death (WSoD) PHP version mismatch or a plugin conflict from the old server. Use the Nixzoe WordPress Manager to disable all plugins or increase the PHP Memory Limit to 512M.
"404 Not Found" on subpages Missing or corrupted .htaccess file. Go to Settings > Permalinks in your WordPress dashboard and click Save Changes to regenerate the file.
Links pointing to old domain Database contains hardcoded links from the previous host. Use a "Search and Replace" plugin or a phpMyAdmin command to update the old URL to your new Nixzoehost URL.
Database Import fails (File too large) The .sql file exceeds the phpMyAdmin upload limit. Zip the .sql file before uploading, or ask Nixzoe support to import it via command line (SSH) for you.

Summary Checklist

  • [ ] Files uploaded to public_html via SFTP.

  • [ ] Database .sql file imported via phpMyAdmin.

  • [ ] wp-config.php updated with correct credentials.

  • [ ] Permalinks refreshed (Go to Settings > Permalinks and click Save).


Nixzoehost Advice: Manual restores can be tricky. If you are moving a site from another host, remember that we offer Free Professional Migrations. Our team can handle this entire process for you to ensure zero downtime and perfect data integrity.


Was this answer helpful?

« Back