plugins folder not included in backup

Hi
I've setup snapshot pro to make a daily backup of the database and all the files (plugins, themes and files) - I've included a screenshot of the configuration.
I checked the first backup and everything is inside, except for the plugins folder.

I have to say I renamed the wp-content and plugins folder by setting the WP_PLUGIN_DIR & WP_PLUGIN_URL constants in wp-config, I use this setup:

define('NR_SITE_URL', 'http://example.com]);
define('WP_CONTENT_FOLDERNAME', 'assets');
define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME );
define('WP_CONTENT_URL', NR_SITE_URL.'/'.WP_CONTENT_FOLDERNAME);
define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/extra' );
define('WP_PLUGIN_URL', WP_CONTENT_URL.'/extra');

This means I have a folder "assets" in my root (instead of wp-content), inside this folder is the plugins-folder, which has the name "extra".

I think Snapshot Pro assumes the plugins folder always has the name plugins.. ?

  • Adam Czajczyk
    • Support Gorilla

    Hey Joachim,

    I hope you're having a great day and thank you for your question!

    We've got a bit unusual situation here, I think. As you have renamed the plugins folder, this is most likely the reason why Snapshot doesn't include it in a backup. I took a brief look at the plugin's code and it seems that Snapshot determines folder paths by reading WP defined constants but "WP_CONTENT_DIR" and "WP_PLUGIN_DIR" aren't among those.

    Having said that, I passed this issue to our 2nd-line support and hopefully they'll be able to either confirm that or come up with a solution for you.

    Please keep an eye on this thread for further updates and notices.

    Cheers,
    Adam

  • Joachim
    • WPMU DEV Initiate

    Hi Adam

    I had a look at the main file of Snapshot Pro (snapshot.php) and changed the plugin-path on line 3085 & line 7145 from $_path = trailingslashit(WP_CONTENT_DIR) . 'plugins/'; to $_path = trailingslashit(WP_PLUGIN_DIR);

    I made a new backup and now the plugins-folder is included.
    WP_PLUGIN_DIR is a core WP constant, but I don't know if you may use it like this in plugins.
    Anyway, problem solved for me (I just have to make the change every time I update the plugin) and if this could be easily fixed in the plugin, would be nice!

  • Adam Czajczyk
    • Support Gorilla

    Hey again!

    Thanks for this information! I'm sorry I wasn't of much help here, I must have missed this somehow as I was looking for this exact constant. Better glasses I need probably :slight_smile:

    Having said that, I'm glad that it works for you and I consider this thread resolved!

    Have a nice day and if you have any other questions, I'll be glad to assist!

    Cheers,
    Adam

  • Myke
    • Flash Drive

    Same issue. Renaming the folder is a bit more common than you may think. I really don't want to update the core with every update (I am sure most don't). Can't you just make the plugin (and defender) get this info from wp config?. It would make your suite much more useful. The plugins folder not being scanned and not being backed up has me needing to go back to my former solutions for now.

    • Adam Czajczyk
      • Support Gorilla

      Hi Myke

      I hope you're well today and thank you for your question!

      This thread is very old and quite outdated (it's from 2015) while Snapshot had a lot of updates since then and is working now in quite a different way. I understand that you're experiencing the same/similar issue but in order to be able to help you solve it, we should handle it separately so could you please start your own separate ticket for it?

      You can create a ticket or join our live chat support here:

      https://premium.wpmudev.org/live-support/

      Best regards,
      Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.