• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Custom sub directory of wordpress returns error

secondsky

New Pleskian
This happens only with Wordpress installed using the app catalog.
If installed manually and than integrated into toolkit, it works.

- Changing default wordpress directories in the wp-config, like:
Code:
 /** Change File Structure */
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/core' );
define( 'WP_CONTENT_URL', 'https://www.domain.com/core' );
define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/core/modules' );
define( 'WP_PLUGIN_URL', 'https://www.domain.com/core/modules' );
define( 'UPLOADS', 'core/files' );

If this is done, the wordpress toolkit responds with a skull and that wp-content could not be found.
This is clearly because the toolkit doesnt check the wp-config for the above mentioned variables.

I use this because it takes away rewrite rules which reduce performance and also obfuscates the usual "target points" for attackers.
 
After you have applied your wp-config changes, have you hit the update/reload button in the Wordpress toolkit to reflect the changes of the configuration file?
 
Yes, I did that.
And there is no way to disconnect the WP installation (and reconnect) as that is not possible for installations through APS catalog.

The toolkit is defiantly not checking the wp-config file for such changes for APS catalog installations, might be a bug. As for normal manual WP installations it works
 
Last edited:
You can easily disconnect it. Simply use the three-bar-menu to the top right of the WP Toolkit page. Afterwards let Plesk search for WP installations. However, that should not be necessary. You could equally well hit the Refresh icon on the WP Toolkit page.
 
The reason for the behavior is that there are two different ways to install and manage Wordpress. The one is through the Wordpress Toolkit installation button "Install Wordpress". The other is through the catalog. The catalog is the "wrong" way. You need to install it through the "Install Wordpress" button. Wordpress should not be part of what the APS catalog offers. The admin can provide it as an application through that catalog, but it is a different source than using the WP Toolkit, so normally it makes no sense to offer it through the catalog.

You can try the following: Create a subdomain, then use the "Install Wordpress" button on the subdomain to install Wordpress. Then try to detach it from Plesk. That will work. The difference in the installation could also help to solve the initial issue that the toolkit does not Refresh from the wp-config file. Try your config file change on the subdomain for testing purposes, then click the "Refresh" icon in the upper right corner of the WP Toolkit page. it should read the new data paths.
 
Thx for the explanation... danke! Quite chaotic unlogic that wp toolkit makes a difference on the source of the installation. Cause the end product is the same. I would consider this as a bug, unless you can give me a proper reason why it should behave like that^^

I will try and report if it helped
 
We do not recommend to use Applications catalogue in Plesk (knows as APS-catalog) and utilize WordPress Toolkit to install WordPress. It doesn't help much in the situation you have described but will help avoid possible future issues.

At the moment, WordPress Toolkit doesn't provide a proper ability to work with WordPress websites with customized directories structure. We will consider adding this ability in future.

> If installed manually and than integrated into toolkit, it works.
Could you please describe a way you use to integrate custom installed website into the toolkit?
 
So, I tried all the above and more. Did not work. What did work is:
  1. Changing file structure as wished, adding the above code to wp-config.
  2. Creating a empty directory wp-content.
The last thing is what triggers WP toolkit. So its luckily just a dumb check if this directory exists.
I manage already another installation through the toolkit, there i can see the same.
Nearly everything works quite well with this setup, just maintenance mode through toolkit is going to use the empty wp-content directory.

I am now quite sure that these variables in the wp-config are not read my wp toolkit. its hard coded.
 
This is because the Toolkit will detect your website only in the following cases:
  • There are wp-content, wp-includes and wp-config.php in the same directory.
  • There are wp-content and wp-includes in the same directory and wp-config.php in the directory one level up.
This is how it works at the moment.
 
So, I tried all the above and more. Did not work. What did work is:
  1. Changing file structure as wished, adding the above code to wp-config.
  2. Creating a empty directory wp-content.
The last thing is what triggers WP toolkit. So its luckily just a dumb check if this directory exists.
I manage already another installation through the toolkit, there i can see the same.
Nearly everything works quite well with this setup, just maintenance mode through toolkit is going to use the empty wp-content directory.

I am now quite sure that these variables in the wp-config are not read my wp toolkit. its hard coded.
I would suggest you report if it isn't working till now!
 
Last edited:
I have a similar problem to OP - I store the WP core separately from my customizations and use the WP_CONTENT_DIR constant in the config to inform WP of this change. WP Toolkit picks up the core installation but ignores the plugins inside my custom wp-content dir.

To resolve this, I tried adding an empty wp-includes directory adjacent to my wp-content dir and this was successful in having WP Toolkit add it to the list of sites, however, there is an error message: Error: This does not seem to be a WordPress installation. Pass --path=`path/to/wordpress` or run `wp core download`.

Any help on getting those plugins scanned would be appreciated.
 
Back
Top