Skip to content

Importing a WordPress Site

Introduction

You can import an existing WordPress site into a new Staatic Cloud site instead of starting with an empty installation.

The import runs against your site’s managed WordPress instance. Your current public static site is not affected until you publish a new static version.

Supported backup types are:

Staatic detects the type when it checks the backup. You don’t need to choose it.

Before you start

Before importing a backup, make sure that the following requirements are met.

  1. Create your Staatic Cloud site first by following the Getting Started guide.
  2. Wait until site provisioning has finished and your managed WordPress instance is available.
  3. Prepare a single-site WordPress backup of one of the supported types. For an archive of your own files and database, see Preparing a WordPress files + database archive.
  4. If your backup is larger than 4 GiB, the browser upload limit, upload it to your site over SFTP first. We recommend using /private/imports, because it keeps the backup away from web-accessible WordPress paths.

Note: Staatic creates a pre-import backup before the import starts, but the import still replaces the current files and database of the managed WordPress instance.

Preparing a WordPress files + database archive

If you don’t use All-in-One WP Migration, UpdraftPlus or Duplicator, put your site’s files and its database dump in one ZIP or tar archive (.tar, .tar.gz or .tar.bz2).

The archive must contain:

  • the site’s wp-content folder, with at least one of plugins, themes or uploads in it
  • one database dump of the site, as a .sql or .sql.gz file

Any of these layouts works. The examples show a ZIP; a tar archive works the same way.

A Staatic Cloud backup download:

my-site.zip
|-- database.sql
`-- wordpress/
    |-- wp-config.php
    `-- wp-content/
        |-- plugins/
        |-- themes/
        `-- uploads/

Your WordPress folder zipped, with the dump next to it:

my-site.zip
|-- database.sql
|-- wp-config.php
|-- wp-admin/
|-- wp-includes/
`-- wp-content/
    |-- plugins/
    |-- themes/
    `-- uploads/

Only wp-content and the dump, which is all the import needs:

my-site.zip
|-- database.sql
`-- wp-content/
    |-- plugins/
    |-- themes/
    `-- uploads/

A few more things are fine:

  • The archive may wrap everything in one folder, as macOS Compress and Windows Send to > Compressed (zipped) folder do.
  • The WordPress folder may sit a few folders down, and the dump may be in a folder of its own next to it, such as sql/ or mysql/.
  • If the archive holds other .sql files that are not a WordPress database, Staatic ignores them and lists them in the check. If Staatic can’t tell which WordPress dump belongs to the site, it names them and asks you to keep only one.
  • If the dump holds the tables of more than one site, include the site’s wp-config.php. Staatic reads its table prefix from it. It never runs the file.

Hosting panel backups

A cPanel or DirectAdmin full backup of an account with one WordPress site can be uploaded as it is (.tar.gz or .tar). Staatic takes the site’s wp-content folder and its database dump from it. Nothing else in the backup, such as mail or settings, is restored.

If the backup holds more than one WordPress site, or it is a Plesk backup, export only the site you want with a backup plugin, or upload a ZIP or .tar.gz of the site’s folder (often public_html) together with its database dump.

All-in-One WP Migration (.wpress)

Export the site with All-in-One WP Migration to a file, and upload the .wpress file itself.

  • Export it without a password: leave the password under Advanced options empty.
  • A compressed export (GZip or BZip2) is fine.
  • Keep the database and the plugins, themes and media in the export.
  • Export a single site. A multisite network can’t be imported.

The check tells you when one of these is not the case. Export the site again and upload the new file.

The files and database are restored as for every backup type (see What gets restored). The theme and plugins that were active on the exported site are active again after the import. If one of them is not in the backup, the check warns you, and a plugin that is missing stays inactive.

Like every import, Staatic changes only the site’s URLs. Replacements that All-in-One WP Migration’s own import adds, such as old file paths or email domains, are not applied.

Importing your backup

Follow these steps to import your site.

  1. Go to app.staatic.com and log in with your account details.
  2. Click Account > Sites. Then click on the View Icon next to the relevant site.
  3. Click the WordPress tab.
  4. Click Import from backup when the import prompt is shown, or choose Import WordPress Backup from the actions menu.

A Cloud site on its WordPress tab, with Import WordPress Backup chosen in the actions menu next to the run button.

  1. Choose one of the available source options.

    • Upload from computer to upload a ZIP, tar or .wpress file through your browser.
    • Choose from SFTP files to select a ZIP, tar or .wpress file that is already present on the site’s filesystem. For backups uploaded over SFTP, /private/imports is the recommended location.

The WordPress import panel at its first step, Choose backup: the supported backups, from All-in-One WP Migration (.wpress) to a ZIP or tar archive of your files and database, Upload from computer or Choose from SFTP files, and the Choose file button.

  1. Select your backup file and continue.
  2. Wait for Staatic to check the backup and detect its type.
  3. Review the detected details, the Contents section (what will be restored) and any warnings.
  4. Tick the confirmation and click Start import (Import anyway when the check shows warnings) to restore the backup into your managed WordPress instance.

Nothing on your site changes until you confirm. A checked backup waits 7 days for you to confirm it; after that it is discarded and you upload it again. If the check finds a problem, it tells you what to fix.

During the import Staatic will:

  • create a pre-import backup of the current managed WordPress instance
  • replace the current WordPress files and database with the imported site
  • change the site’s URLs to the address of your managed WordPress instance
  • validate the imported WordPress installation before marking the import as completed

What gets restored

The same rules apply to every backup type.

  • Database: replaced with the one in the backup.
  • Folders plugins, themes, uploads and mu-plugins: each one that is in the backup replaces the site’s folder. A folder that is not in the backup is kept as it is, and the check warns you about it.
  • The rest of wp-content: other folders, such as languages or a plugin’s data folder, are added to the site and overwrite files with the same name.
  • WordPress core and wp-config.php: never restored. Staatic manages them, along with everything else outside wp-content.
  • Also never restored: the Staatic plugins (your site keeps the ones Staatic Cloud provides), drop-ins such as object-cache.php, cache folders, backup plugins’ own backup folders, and links. The check lists what it leaves out.

Database dumps

Staatic removes USE and CREATE DATABASE statements from the dump, so it imports into your site’s database, and lists them in the Contents section.

A dump with triggers, views, stored procedures, functions or events can’t be imported. Export the database again without them: with mysqldump, add --skip-triggers and leave out --routines and --events; in phpMyAdmin, untick the trigger, procedure, function, event and view options.

A dump that creates user accounts, grants privileges or changes server settings can’t be imported either. The check names what to change.

If an import fails

If an import fails after it has started changing your site, Staatic restores the pre-import backup automatically. The import result then says that your site was restored to how it was before the import.

If an import fails before that point, the import result says that nothing on your site was changed.

If the automatic restore can’t finish, the site stays paused and the import shows as failed. Contact support and we will finish restoring it.

If Staatic imported the backup but could not verify the WordPress site afterwards, the import result asks you to contact support. Do that before you publish the site.

Reviewing and publishing the imported site

After the import has completed, review the imported site in WordPress before publishing it as a static site.

  1. Click Login on the WordPress tab to access WordPress Admin. See Team Access if the user reviewing the site needs WordPress access.
  2. Review your content, theme, plugins, and site settings.
  3. Make any changes needed for your Staatic setup.
  4. Start a new Staatic publication when you are ready.

Your public static site will only change after that new publication completes.

Limitations

Keep the following limitations in mind.

  • Only the supported backup types can be imported. Other archives, such as .7z or .rar, can’t.
  • Browser uploads can be up to 4 GiB, as the import panel shows. Upload larger files over SFTP first.
  • The import is intended for single-site WordPress backups. Duplicator DAF archives, database-only packages, password-protected .wpress files, and multisite backups are not currently supported. See WordPress Multisite for how a network is set up on Staatic Cloud.
  • Completing an import does not publish the imported site. You publish a new static version yourself.