Some Useful "Constants" for UpdraftPlus

Originally published at: Some Useful "Constants" for UpdraftPlus - MainWP WordPress Management

If you are using the UpdraftPlus plugin for site backups then you can control a number of parts of the plugin using constants. Useful Constants for UpdraftPlus The constants for the UpdraftPlus plugin can be added to the site wp-config.php file. Adding constants to your site wp-config.php is possible using the code snippets extension of…

A useful snippet that can be used to speed up backups and use less disk space by excluding image thumbnails:

/** Exclude image thumbnails from UpdraftPlus backups */
function jkws_updraftplus_exclude_file( $filter, $file ) {
    return preg_match( "/-\d+x\d+\.(?:png|jpe?g|bmp|tiff|gif|webp|avif)$/", $file ) ? true : $filter;
}
add_filter( 'updraftplus_exclude_file', 'jkws_updraftplus_exclude_file', 10, 2 );

This is the same code as used by the plugin Exclude Image Thumbnails From UpdraftPlus Backups – WordPress plugin | WordPress.org

1 Like

K thanks added to Exclude image thumbnails in backups created in UpdraftPlus

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.