Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Please do not use static path in must-use plugin. Breaking staging sites!

$
0
0

Replies: 0

Hi guys,

I am the developer of WP Staging https://wordpress.org/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é


Viewing all articles
Browse latest Browse all 59525

Trending Articles