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

    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

    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!

  • Myke

    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.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.