Title: Exclusions not working
Last modified: March 14, 2017

---

# Exclusions not working

 *  Resolved [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/)
 * screenshots: hhttp://imgur.com/a/wd3kq
 * My backup last night ballooned from 264mb to 629mb. I found some media directories
   that had not been excluded, excluded them and re-ran the backup. Now it was down
   to 460mb. The only other additions in the past few days was the install of Duplicator
   but when I went to exclude its directories, Backupwordpress indicated that the
   directories and files were already excluded and did not allow me to exclude them
   manually. But it looked like the Duplicator files could account for the size 
   difference after being compressed.
 * Another problem, as seen in the screenshots, is the list of sizes of directories
   and files does not equal the total shown for the topmost directory. The list 
   of excluded files also doesn’t show the wc-snapshots directory, which is part
   of Duplicator (it does appear as excluded in the main directory list though).
   The Excluded files list also doesn’t show sizes, making an attempt to figure 
   this out even more difficult.
 * So I downloaded and unzipped the latest manual backup file.
 * Want to guess what directory accounted for the increase in size?
 * wc-snapshots
 * Yes, the directory that says 0 in the screenshots and has a status of Excluded.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8912773)
 * So I think the issue here is that the plugin isn’t able to configure the size
   of your site fully, so when you see the 0 that is actually indicating that it
   ran out of time to figure it out and doesn’t have an estimate. I don’t know for
   sure on that. I DO know that the wc-snapshots is supposed to be excluded, so 
   I don’t understand why this is happening.
 * Let me do a little checking on our auto-excluded files and come back with an 
   update from there.
 * kat
 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8912815)
 * Okay I looked up our list of automatic exclusions – can you verify for me (I 
   looked on the screenshot but didn’t see it) – what is the name of the directory
   that didn’t get excluded properly? Is it “wp-snapshots” or “wc-snapshots”?
 * Thanks,
    Kat
 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8912888)
 * So I just tested this locally and it’s doing the exact same thing with mine –
   I think the exclusion rule for wp-snapshots isn’t working correctly because they
   included a wildcard within it.
 * Doing a bit more checking on getting it resolved moving forward in an update,
   but for now you can go around this one by adding a specific exclusion to your`
   wp-config.php` file using what we call a ‘constant’ – which will define a location
   or setting for the plugin by putting a line in the wp-config file.
 * You can read more about the constants we use and how to edit the wp-config file
   at our Knowledge Base: [https://bwp.hmn.md/knowledge-base/constants-advanced-options-backupwordpress/](https://bwp.hmn.md/knowledge-base/constants-advanced-options-backupwordpress/)
 * This is the variable you’re setting: **HMBKP_EXCLUDE** — This allows you to specify
   either a path to a specific location or file or to use a kind of wildcard to 
   match all files or folders that share a specific name. You would use the following
   line, changing the actual exclusions to the ones you need:
 * `define( 'HMBKP_EXCLUDE', '/wp-snapshots/' );`
 * Let me know if that helps, okay?
 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8912899)
 * PS – I’ve still noted that we need to check on your extra backups, but I’m wondering
   if that is a server-level glitch or not. I’m doing a bit more checking on this!
 * Kat
 *  Thread Starter [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8912978)
 * I moved this website to a new hosting company a little more than a month ago.
   As you know I first reported the extra backup problem in an earlier thread BEFORE
   the move. Closing it out as “resolved” seems weird to me…since I don’t see it
   being resolved.
 * I opened this new thread because it’s a separate problem.
 * I did mistype wp-snapshots in the message at the beginning of this thread — its
   not wc-snapshots — which is why I include screenshots. ; )
 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8913578)
 * Ok –
 * I’ll go ahead and reopen the other topic – I was just trying to keep your two
   issues connected because many times they are interrelated when one user has multiple
   issues 😀
 * Any news on excluding the file differently as I outlined above?
 * Thanks,
    Kat
 *  Thread Starter [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8913746)
 * I don’t think the two issues are interrelated since the extra backups first occurred
   on the old server months ago and continued on the new server. The exclusion problem
   with Duplicator only started this week.
 * Before I add the HMBKP_EXCLUDE, does that simply add a specific exclusion(s) 
   to the existing exclusions or do I have to also add all the exclusions I have
   already added on the Backup admin page?
 * How does it read the path? i.e. what level directory does it start with?
 * If those questions are answered on the page you referenced, it wasn’t obvious
   to me.
 *  Thread Starter [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8914605)
 * For grins I just installed and ran the free version of UpdraftPlus. I did not
   set any exclusions (I’m not sure how much you can control exclusions with the
   free version anyway). It created a backup folder called updraft that contained
   various zip files. The full directory was a little over 504mb. Inside that folder,
   one of the zip files was all the media files, which was 337mb. So if you subtract
   the media files, that leaves less than 200mb of other stuff. Seems that’s what
   BackUpWordPress’ zip file should be, around 200mb, right? (Instead of the 460mb
   file that includes the Duplicator backup).
 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8923433)
 * Yes – it sounds like that is about right.
 * So I’ve changed this in our code so it will come out in the newest release, but
   for now you can add the exclusion like I noted above — it adds another exclusion
   to the ones you already have as well as the other default ones. If the `wp-snapshots`
   folder is inside of the wp-content folder you’ll want to include that in the 
   path. To be sure, you could include the full server path to the directory, but
   it will read it from the root path forward.
 * Did I make that clear as mud or help? 😀
 * Thanks,
    Kat
 *  Thread Starter [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8924026)
 * Everything is clear except the difference between
 * “the full server path to the directory”
 * and
 * “the root path forward”
 * In my mind, that sounds like the same thing.
 * Anyway, to be more specific, will `define( 'HMBKP_EXCLUDE', '/wp-snapshots/' );`
   work or do I need
 * `define( 'HMBKP_EXCLUDE', '/wp-content/wp-snapshots/' );` ?
 *  Plugin Contributor [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8924152)
 * Hey there –
 * Yes, `define( 'HMBKP_EXCLUDE', '/wp-snapshots/' );` should work as it should 
   just exclude any directory with that name. But I’ll be honest, at this point 
   I keep finding small discrepancies in what should be excluded and what is actually
   excluded.
 * It might be better to include the full path to the directory: `define( 'HMBKP_EXCLUDE','/
   wp-content/wp-snapshots/' );` — depending on whether your absolute path starts
   there or not (ie. is your absolute path, or server path, more along the lines
   of `var/html/www/something/something/blahblahblah/` or is WordPress installed
   in the root of your server/host).
 * Does that help at all? 😀
 * Kat
 *  Thread Starter [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8927721)
 * I added the code in my wp-config and ran a manual backup but the size didn’t 
   change significantly – 458mb vs 460mb. Either the path is wrong or the code doesn’t
   work.
 * I’d love to spend my days troubleshooting your plugin but I don’t have the time.
 *  Thread Starter [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * (@forkmedia)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8927902)
 * Finally.
 * I took the path out of the exclude code and left just the snapshots directory
   and it worked.
 * Whew…

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Exclusions not working’ is closed to new replies.

 * ![](https://ps.w.org/backupwordpress/assets/icon-256x256.jpg?rev=1105225)
 * [BackUpWordPress](https://wordpress.org/plugins/backupwordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/backupwordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/backupwordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/backupwordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backupwordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backupwordpress/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [forkmedia](https://wordpress.org/support/users/forkmedia/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/exclusions-not-working-2/#post-8927902)
 * Status: resolved