Warning during changing the preferred domain setting: Unable to configure "WordPress". The following problems were found: Non-zero exit status returned by script

Created:

2017-04-03 15:20:03 UTC

Modified:

2017-08-16 16:43:30 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Warning during changing the preferred domain setting: Unable to configure "WordPress". The following problems were found: Non-zero exit status returned by script

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

While updating setting in Domains > example.com > Hosting Settings > Preferred domain a warning related to failed WordPress installation appears:

Warning: Unable to configure "WordPress". The following problems were found: Non-zero exit status returned by script. Output stream: 'PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /opt/psa/var/apspackages/<package_name>/cache/scripts/db-util.php:66

The WordPress instance was originally installed from the APS package version 4.2 or 4.3 and updated using the WordPress Toolkit .

The PHP 7.0 or newer is used on the domain.

Cause

While WordPress instance was updated, the APS package itself was not, which leads to the situation when Plesk tries to configure all instances even for additional domains. This is Plesk bug with ID # PPPM-6008 which will be fixed in future updates.

Resolution

As a workaround:

1. Determine which Wordpress instances give this error and be sure that they have an old APS package.
This can be performed in Tools & Settings > Application Vault .
2. Make a backup of instances files ( .zip file of the httpdocs folder would be sufficient) and database dumps.
3. Disable WordPress Toolkit in the /usr/local/psa/admin/conf/panel.ini file:

# cat /usr/local/psa/admin/conf/panel.ini  

...
[wpToolkit]
enable = off
...

4. Determine the latest version of the Wordpress APS package (instances will be updated to this version).
5. Modify configure script of this APS package in /usr/local/psa/var/apspackages/<your_package>/cache/scripts/configure :
Change:

<?php  

To:

<?php  

exit(0);

6. Update appropriate APS instances via Plesk GUI.
7. Replace files of instances by files from previously backed up .zip files.

Alternative workaround:

Switch PHP from the version 7.0 to an older one for the Wordpress instances installed via APS (originally version 4.2 or 4.3).

Have more questions? Submit a request
Please sign in to leave a comment.