There are many tools allow you to backup and then restore your WordPress website’s data, but in this article, we’ll focus on 4 methods:
- Using the WordPress export tool
- Using the UpdraftPlus plugin
- Using the WordPress.com exporter
- Using FTP and PHPMyAdmin tools
WordPress export tool
By default, WordPress comes with a pre-installed export tool that you can use to backup specific data from your website. You can find the export tool in your WordPress dashboard > Tools > Export section.
Here, you can choose to export all content (posts, pages, custom fields, tags, categories, comments, navigation menus, custom posts) or export only posts, pages, or media content:
Since we want to export everything, select All content, then click Download Export File to download the XML file to your computer.
To import this data to your brand new website, log in to the WordPress dashboard of your new website and head to Tools > Import. Click Install Now under WordPress Importer to install the addon:
Once installed, you’ll see a success message, so click the Run Importer option:
Click Browse and locate the previously downloaded XML file on your computer, and then click Upload file and import to import the data:
Choose if you want to import the author or assign all posts to an existing user, and if you want to import attachments and click Submit:
That’s it! If your primary website is still online, WordPress should automatically import media files like images, thumbnails, etc.
The issue with the default WordPress export tool is that it doesn’t transfer all content on your website. So while you can move posts, pages, custom meta-data, etc., it won’t move your theme files, plugins, and certain media files, so you’ll have to do that manually.
To avoid doing things manually, you can try using a third-party plugin.
UpdraftPlus is one of the best backup/migrator plugins for WordPress and it’s straightforward to use.
Log in to your WordPress dashboard, click on Plugins > Add New, fill in UpdraftPlus in the top-right search bar, and click Install Now
Once installed, click Activate to activate the plugin:
Head to Settings > UpdraftPlus Backups, and click the Backup Now button:
You’ll see a new pop-up window with available options. We recommend leaving those as-is as we want to create a backup of both the database and our files. Click Backup Now to create a backup of your website:
The backup process can take a while, depending on the size of your website. However, Updraft will show you the progress the entire time:
To download your backups, find the Existing backups section and click on the individual buttons in the table:
To restore these backups on your new website, install and activate the UpdraftPlus plugin as mentioned previously by heading to Settings > UpdraftPlus Backups, and click Upload backup files under the Existing backups section:
You can then drag and drop your previously downloaded backup files to the drop area or click Select Files to browse and restore your backups:
To export all your text content (posts, pages, feedback/survey), click Export all, and to export your images, click Download under the Export Media Library section:
Once downloaded, you can use the WordPress Importer tool in your WordPress Dashboard > Tools > Import to import your backup onto your new WordPress installation.
FTP and PHPMyAdmin method
The last method is the manual approach and it is not recommended for beginners. WordPress consists of the files and the database, and we use two different tools to back up these.
For files, you need to login into your account via FTP or SFTP and download the root folder.
A couple of examples:
If your website is the primary website on your account, you need to download the entire public_html directory.
If your website is a subsite on your account (i.e., not primary), you need to download the folder within the public_html directory.
To export the database, go to your web hosting control panel, in our example, we used cPanel control panel.
Click on phpMyAdmin under the Databases section:
Once inside phpMyAdmin, click on the database you’d like to export from the left-hand side:
Next, click the Export button in the top menu bar:
If you simply want to export your database tables to import to a fresh WordPress installation, click Go:
This will prompt you to download the .sql file to your computer.
If you want to export your database to import to an existing WordPress website, select the Custom option and make sure to tick Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement.
This option will remove all tables that already exist during the import and overwrite them with new data. Leave all other settings as is, and click Go to generate the SQL file.