Content

  1. Exporting data from your current WordPress site
  2. Importing data to Shifter Headless Site

Notes

Shifter Headless only accept SQL data (Post, Page or other content) for data migration.

 

Exporting data

We recommend using All-in-One WP Migration to migrate data.

1. Navigate to WordPress dashboard

2. Add filter to exclude some directories

Directories should be exclude are

  • wp-content/ai1wm-backups
  • wp-content/languages
  • wp-content/mu-plugins
  • wp-content/plugins
  • wp-content/themes
  • wp-content/upgrades
  • wp-content/object-cache.php
  • wp-content/uploads (if you don't need to copy media)
  • or other directories  you don't need to copy

Here is sample code for excluding directories. You can copy and paste following code to functions.php 

add_filter('ai1wm_exclude_content_from_export', function($exclude_filters) {
  $exclude_filters[] = 'ai1wm-backups';
  $exclude_filters[] = 'languages';
  $exclude_filters[] = 'mu-plugins';
  $exclude_filters[] = 'plugins';
  $exclude_filters[] = 'themes';
  $exclude_filters[] = 'uploads';
  $exclude_filters[] = 'upgrades';
  $exclude_filters[] = 'object-cache.php';

  return $exclude_filters;
});

Never forget to remove codes after exporting data.

Or use All-in-One WP Migration Files Excluder

This sample excludes these directories or files from All-in-One WP Migration backup data.

/wp-contente/ai1wm-backups,/wp-content/languages,/wp-content/mu-plugins,/wp-content/plugins,/wp-content/themes,/wp-content/uploads,/wp-content/upgrades,/wp-content/object-cache.php

3. Install and activate All-in-One WP Migration 

4. Navigate to Export page

5. Click [Advanced Options] to configure export settings

6. Check these items to export database (sql file) only.

  • [✓] Do not export spam comments
  • [✓] Do not export post revisions
  • [✓] Do not export media library (files)
  • [✓] Do not export themes (files)
  • [✓] Do not export inactive themes (files)
  • [✓] Do not export must-use plugins (files)
  • [✓] Do not export plugins (files)
  • [✓] Do not export inactive plugins (files)
  • [✓] Do not export cache (files)
  • [✓] Do not include the selected files (if available)

7. Click [EXPORT TO] and choose [FILE]

8. Click [DOWNLOAD ...] and you've got file.

 

Importing your Backup 

9. Start WordPress from Shifter Headless Dashboard

https://go.getshifter.io/admin/headless 

10. Activate All-in-One WP Migration on Plugins page

After logging in to your Headless WordPress site, navigate to the WordPress Plugins page activate All-in-One WP Migration plugin.

11. Navigate to [Import] under [All-in-One WP Migration] menu

12. Importing your Backup

13. Click [FILE] and select backup file

14. Click [I HAVE ENUGH DISK SPACE] to continue

15. Click [PROCEED] to overwrite data.

16. Click [FINISH]

17. Logout and re-login with WordPress credentials

18. Confirm data is imported


That's all

Did this answer your question?