Exclude ai1wm-backup folder from Softaculous backups

Exclude ai1wm-backup folder from Softaculous backups

For WordPress websites that use both Softaculous backups and AllInOne Migration plugin backups, Softaculous backups include the .wpress files created by the ai1wm plugin and therefore this will significantly increase the size of Softaculous backup files. To exclude ai1wm-backup folder from Softaculous backups SSH into your server and navigate to the following path:

For cPanel

/usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/hooks


For Direct Admin

/usr/local/directadmin/plugins/softaculous/enduser/hooks


For Plesk, ISPManager, ISPConfig, InterWorx, CWP

/usr/local/softaculous/enduser/hooks

Copy the existing file filter.txt to filter.php and edit it:

cp filter.txt filter.php
nano filter.php

Uncomment the following part inside filter.php and add the path to the ai1wm-backup folder:

image 17 - Exclude ai1wm-backup folder from Softaculous backups
$exclude_files[] = $softpath.'/wp-content/ai1wm-backups';

$exclude_files – This will be the list of files to be excluded calculated by Softaculous.
$softpath – This is the path of the backup installation.

Save the file and next time Softaculous backups run, the ai1wm-backup folder will be excluded.

TIP: After saving the file open Softaculous admin section, if there is a syntax error in the filter.php file the admin page will give 500 error.

More information can be found in Softaculous documentation

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.