Please do not use static path in must-use plugin. Breaking staging sites!
-
Hi guys,
I am the developer of WP Staging https://www.ads-software.com/plugins/wp-staging/
In your must-use plugin you are using a static path like this:
$plugin_file = '/home/public_html/wp-content/plugins/swift-performance-lite/performance.php';
WP Staging creates staging sites in sub folders like domain.com/staging. It’s also cloning the must-use plugins.
This code is breaking users staging sites and lead to fatal errors when they create a staging site with WP Staging and other cloning plugins (Error Cannot declare class Swift…) This happens because WP Staging clones an entire site which includes the must-use plugins, too.
So instead of using a static path please switch over to a dynamic approach like the one below:
$plugin_file = ABSPATH '/wp-content/plugins/swift-performance-lite/performance.php';
This should be working.
Cheers
René
- The topic ‘Please do not use static path in must-use plugin. Breaking staging sites!’ is closed to new replies.