Staging is not copying the wp-content files

Hello dear MainWP Team,
we decided to use the MainWP Pro with Staging extension. Everything works great until the staging creation is over.

The main problem is:
Staging Plugin can’t recognize the non-default WP folder structure. It recognizes only the folder where the WP Core is installed. But unfortunately, not everybody uses the vanilla WP Folder structure. In this case it copies only the core files and installation, so that the content/themes/plugins are completely missing.

Example: Custom WP Content and Core Directory changed with
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/directory/wp-content' ); in wp-config.php
or modern dev setups like Bedrock.

There are many reasons why users would want to change and separate core files from the content. In our case is the same situation. We have “content” folder where themes, plugins etc. are being stored, and we also have “cms” folder where the WP core is stored.

Now, I noticed that under the MainWP > Child Site > WP Staging > Create New, there is an option for “Extra directories to copy”. But the tooltip there also says Enter one folder path per line. Folders must start with absolute path: /www/htdocs/xxx/ , so the Plugin from the beginning really only recognizes the core folder, the content folder is being totally ignored. If I try to write /content/ or something else, it just wont recognize it, or it gives a simple “Array” message.

Is there any possibility to override the Plugin / MainWP Extension so that it can also recognize files outside of core installation folder? (Similar to BackWPup Backup Plugin).
Or do you have a better solution how to deal with this?
(We have more than 50 Sites with this structure, and we are probably not the only one who work like that)

Thank you for any guidance or solution.
Best Regards,

Hey @Ivi

Thanks for reaching out and reporting this.

Can you please try two things:
a) Try making a staging directly in the WP Staging plugin on one of the child sites and see if the custom directories are included?
b) In the Extra directories to copy in the MainWP Staging extension, try using an asterisk in the path. e.g. /www/htdocs/xxx/* instead of /www/htdocs/xxx/

And as always, make sure you are running the latest version of the MainWP Dashboard 4.3.1, Staging extension 4.0.4., and the WP Staging plugin 2.12.0.

1 Like


thanks for the response!

I checked the versions and everything is up to date.
Tried the two things as you suggested:

a) Same situation. This time I made a screenshot before the process. WPStaging Plugin within WP can’t recognize the folders outside of core directory either.

I also tested the functionality of Duplicator Plugin (it has the same migration principle) on the same site and it works, it recognizes the different WP Structure and makes the migration back to normal structure. So the problem lies really within the WPStaging Plugin.

b) I tried also this, /www/htdocs/xxx/ *, this time I didn’t get an Array Message, copying process was much longer, but still, after I checked the files, wp-content folder was not there.

1 Like

This doesn’t sound like a MainWP issue, so it would be better to contact WP Staging support. They are very helpful. [WP STAGING - Backup Duplicator & Migration] Support |

1 Like

Well, partially yes, because I got to this Plugin through MainWP and the WP settings I have are pretty common in agencies worldwide.

But thanks for the suggestions :blush:, I’ll try to write the same topic there if we don’t get any new solution here.
Is it possible for MainWP to override absolute path of the Extension Hooks?

1 Like

The MainWP Staging extension is only a link (for communication) between the WP Staging plugin and MainWP. The real functionality is in the plugin, not in the extension. And as you already found out that the plugin doesn’t recognize your setup, it has nothing to do with MainWP.

1 Like

Nevertheless I’ll wait for the official MainWP Staff response :blush:

1 Like

Thank you for trying both suggestions.

At this point, it may indeed be best to contact WP Staging support and check with them why isn’t their plugin recognizing those folders.
The “Extra directories to copy” feature is not expected to work if their plugin cannot recognize the existence of those folders.

Please do share their findings with us.

1 Like

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