NEWS

WordPress Backup: What to Save Before Migrating Your Site

Find out what should be included in a complete WordPress backup, how to export files and the database, and when you need to prepare the copy to migrate your site.

WordPress Backup: What to Save Before Migrating Your Site
Image: Redação iMasters

Creating a WordPress backup seems simple until it's time to restore the site on another hosting provider. Downloading a folder of images or exporting just the posts isn't enough: a complete copy needs to include the installation files and the database. If one of these parts is missing, pages, settings, or features may not come back as expected.

The backup copy also protects the site in everyday situations, such as a failed update, accidental deletion of files, or a hack. During migration, it serves another purpose: allowing the content to be rebuilt on the new server. That's why, before you start, it's worth understanding what will be copied and which transfer method makes sense for your case.

What's included in a complete WordPress backup?

Think of the site as two connected parts:

  • Files: include the WordPress core, themes, plugins, images and other uploads, as well as configuration files such as wp-config.php and .htaccess.
  • Database: stores posts, pages, users, comments, and much of the configuration used by WordPress and its plugins.

The files show how the site works; the database holds much of the content and the relationships between its elements. A copy of just the wp-content folder, for example, can preserve images and plugins, but it doesn't replace the database. Exporting only the database, on the other hand, doesn't recover the files needed to display the site.

To submit a WordPress backup for migration through Hostinger's form, the platform's documentation recommends gathering the site's root folder, with its subfolders and the .htaccess file, into a single compressed archive. Accepted formats include .zip, .tar, .tar.gz, .tgz, .7z and .gz. The database must be submitted separately, as a .sql file.

Check before submitting: do you have the compressed site archive and the .sql export of the database? If the database is missing, the WordPress site backup will be incomplete for this procedure.

Do you need to back up manually to migrate?

Not always. If the WordPress site is still online and you have administrator access, Hostinger's migration request lets you provide the domain and the credentials needed for the team to carry out the transfer. If you use cPanel or WHM on your current hosting, you can provide the access address and the panel credentials.

This approach means you don't need to locate the right folder, compress the files, and export the database yourself. Even so, it's wise to keep an independent backup before any major change, especially if the site receives frequent orders, sign-ups, or posts.

Manually submitting the backup becomes relevant when the source site is offline, when there isn't enough access for the login-based procedure, or when you already have a copy ready. In the migration request through hPanel, choose the option to upload the backup files and submit both the site archive and the .sql file.

How to do a manual WordPress backup

Menu names vary depending on the hosting provider. The process, however, usually follows these steps:

  1. Locate the site installation. In the File Manager or via FTP/SFTP, identify the folder that contains WordPress. Check whether it includes items such as wp-content and wp-config.php. In standard installations, the .htaccess file is also in the root folder, but it may be hidden in the file manager because its name starts with a dot.
  2. Gather all the installation files. Compress the site's root folder, including its subfolders and any necessary hidden files. Before downloading the package, check whether it was generated completely and whether you can open it. A file with the correct name but truncated during generation or download may not be restorable.
  3. Identify the database used by WordPress. The wp-config.php file contains the name of the database in use. This check helps avoid exporting the database of another site hosted on the same account.
  4. Export the database as .sql. With many providers, this can be done through phpMyAdmin: select the correct database and use the export function. Save the file separately from the site package.
  5. Do a final check. Verify that the compressed archive includes themes, plugins, and uploads; that the .sql file isn't empty; and that both belong to the same version of the site. Keep these copies in a safe location, outside the original hosting.

If your provider's panel is organized differently, check the company's documentation or support to find the download and export options. Avoid deleting files or changing the DNS while you're still preparing the copy.

Four problems that can compromise the migration

Missing database. This is an easy mistake to make when "site backup" is understood as a copy of just the files. In WordPress, the .sql file is essential for manual submission through the migration tool described above.

Incomplete package. An omitted folder or an interrupted download can leave images, plugins, or configuration files behind. Open the compressed archive and check its contents before submitting it.

Failure to generate the copy. Hosting accounts with little available space may have trouble creating a compressed archive within the account itself. In this case, check the disk space and ask the source provider for guidance.

Insufficient access. WordPress credentials don't always grant access to the hosting panel or the database. Confirm which permissions you have before starting the process.

After the migration is complete, test pages, images, forms, and essential features in the new environment. Only then should you change the domain's pointing, following the destination provider's instructions. For the full sequence of this step, also check our guide on how to migrate a site from one hosting provider to another.

What if the site is already on Hostinger?

In this case, the goal may simply be to create a backup before updating a plugin or modifying the site. hPanel offers a backups section in the site's dashboard, with options that depend on the plan you've contracted. To create a manual copy when the feature is available, go to Sites → Dashboard → Backups and look for the backup creation option.

Even with automatic backups, check the date of the available copy and what will be restored before making a major change. On sites with frequently updated content, an older version can mean losing recent orders, comments, or posts.

A useful backup is one you can locate, open, and restore. For a manual WordPress migration, that starts with two clearly identified items: the complete site files and the database in .sql format. If the site is still accessible and you'd rather avoid preparing these files yourself, the Hostinger migration request offers the alternative of starting the process with your access details.

Translated from the Brazilian Portuguese original · Read the original

More from Redação iMasters
View profile →