- Server operating system version
- Ubuntu 20.04.5 LTS
- Plesk version and microupdate number
- Plesk Obsidian v18.0.49_build1800230110.16 os_Ubuntu 20.04
Hi everyone! I have experienced some very strange behavior with a clients site, or with its clones to be more precised
The situation:
I had a live site managed in Wordpress Toolkit and everything works fine (WP Toolkit version: 6.1.2-7079, Web Admin license). I cloned the live site into two new instances in subdomains (dev and stage). There everything went fine aswell, no errors or anything
Lets call them:
livesite.com
dev.livesite.com
stage.livesite.com
Now the issue: When updating stage or dev somehow live was updated aswell. Further investigation showed all three instances are using the same plugin directory. When checking the directries in wordpress health screen the plugins dir shows the live sites plugin dir, all others look fine.
Heres how it shows in the health/direcitories screen:
WordPress directory location
/var/www/vhosts/livesite.com/dev.livesite.com
Uploads directory location
/var/www/vhosts/livesite.com/dev.livesite.com/wp-content/uploads
Themes directory location
/var/www/vhosts/livesite.com/dev.livesite.com/wp-content/themes
Plugins directory location
/var/www/vhosts/livesite.com/httpdocs/wp-content/plugins
As you can see only the plugins directy is wrong and not set to the plugins folder of the clone dev.livesite.com but using the patt of the original site livesite.com
My obvious problem is that i now cant test plugins updates in dev or stage as it keeps updating the plugins directory of the live site.
I checked the pathes in the data base as well as in default-constants.php and could not find anything that refers directly to the old/original site.
HTACCESS also just has the default stuff from wordpress and wordfence, so nothing there that might cause the issue ether.
Here a copy of the plugin directoy constants:
function wp_plugin_directory_constants() {
if ( ! defined( 'WP_CONTENT_URL' ) ) {
define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); // Full URL - WP_CONTENT_DIR is defined further up.
}
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.6.0
*/
if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // Full path, no trailing slash.
}
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.6.0
*/
if ( ! defined( 'WP_PLUGIN_URL' ) ) {
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // Full URL, no trailing slash.
}
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.1.0
* @deprecated
*/
if ( ! defined( 'PLUGINDIR' ) ) {
define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
}
So my questions:
1. Anyone has an idea what might have caused this? To me the cloning seems to have worked perfectly except the adjustment of the plugins path.
2. I am searching for a way to fix this, ideal would be to now having to recreate the dev and stage clones again.
3. If I really have to remove dev and stage from within WPtoolkit I am concerned this might even delete the live sites plugin directoy.
Any help would be highly appreciated.
Kindest regards
Armin
The situation:
I had a live site managed in Wordpress Toolkit and everything works fine (WP Toolkit version: 6.1.2-7079, Web Admin license). I cloned the live site into two new instances in subdomains (dev and stage). There everything went fine aswell, no errors or anything
Lets call them:
livesite.com
dev.livesite.com
stage.livesite.com
Now the issue: When updating stage or dev somehow live was updated aswell. Further investigation showed all three instances are using the same plugin directory. When checking the directries in wordpress health screen the plugins dir shows the live sites plugin dir, all others look fine.
Heres how it shows in the health/direcitories screen:
WordPress directory location
/var/www/vhosts/livesite.com/dev.livesite.com
Uploads directory location
/var/www/vhosts/livesite.com/dev.livesite.com/wp-content/uploads
Themes directory location
/var/www/vhosts/livesite.com/dev.livesite.com/wp-content/themes
Plugins directory location
/var/www/vhosts/livesite.com/httpdocs/wp-content/plugins
As you can see only the plugins directy is wrong and not set to the plugins folder of the clone dev.livesite.com but using the patt of the original site livesite.com
My obvious problem is that i now cant test plugins updates in dev or stage as it keeps updating the plugins directory of the live site.
I checked the pathes in the data base as well as in default-constants.php and could not find anything that refers directly to the old/original site.
HTACCESS also just has the default stuff from wordpress and wordfence, so nothing there that might cause the issue ether.
Here a copy of the plugin directoy constants:
function wp_plugin_directory_constants() {
if ( ! defined( 'WP_CONTENT_URL' ) ) {
define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); // Full URL - WP_CONTENT_DIR is defined further up.
}
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.6.0
*/
if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // Full path, no trailing slash.
}
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.6.0
*/
if ( ! defined( 'WP_PLUGIN_URL' ) ) {
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // Full URL, no trailing slash.
}
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.1.0
* @deprecated
*/
if ( ! defined( 'PLUGINDIR' ) ) {
define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
}
So my questions:
1. Anyone has an idea what might have caused this? To me the cloning seems to have worked perfectly except the adjustment of the plugins path.
2. I am searching for a way to fix this, ideal would be to now having to recreate the dev and stage clones again.
3. If I really have to remove dev and stage from within WPtoolkit I am concerned this might even delete the live sites plugin directoy.
Any help would be highly appreciated.
Kindest regards
Armin