Excluding Folders while migrating with All-in-One WP Migration

It’s no secret that the All-in-One (AIO) WP Migration WordPress Plugin is our go-to for moving sites.

When developing a custom theme you may use NPM along with other package managers. These create folders to store files necessary during development but they really don’t need to get deployed into production.

By excluding these dependency folders or any folder you really don’t need can dramatically reduce your sites backup size and save you time in your development process.

Excluding Folders

By adding this filter to your functions.php file you can target specific folders or files to exclude.

add_filter('ai1wm_exclude_content_from_export', function($exclude_filters) {
  $exclude_filters[] = 'themes/your-theme-name/node_modules';
  return $exclude_filters;

Another option could be to exclude your theme entirely. This is what we do and instead we track the development of our themes using Git.

If you want to give that a try, check out our article on how to develop WordPress themes on Shifter using Git with WP Pusher including some workflow examples.

Take the Next Step

Get started on your website today with Shifter. Try out our free plan and take the first step towards building the perfect website for you and your visitors.

Copyright © 2023 DigitalCube

A product by

Check out our other products