Applicable to:
- Plesk Obsidian for Linux
Symptoms
-
Unable to install Wordpress core/plugins/themes updates via WordPress Toolkit with the following error:
PLESK_ERROR: Unable to update WordPress because WordPress version 5.X.X requires PHP version 5.6.20 or newer. Change PHP settings on the target domain to use a newer PHP version and run the update again.
-
The domain has a PHP version over 5.6.2 selected at Domains > example.com > PHP Settings
-
The domain shares the same document root with 2 + domains:
# plesk db "select domains.name, hosting.www_root from hosting join domains where www_root like '%example.com%' and domains.id=hosting.dom_id;"
+----------------------------------+-----------------+
| name | www_root |
+----------------------------------+-----------------+
| example.com | /var/www/vhosts/example.com/httpdocs |
| example2.com | /var/www/vhosts/example.com/httpdocs |
+----------------------------------+-----------------+
Cause
Product issue:
-
#EXTWPTOOLK-5566 "WordPress installations accessible via several domains with the same docroot can now be updated properly."
Fixed in:- WordPress Toolkit 4.10.2 16 September 2020
Resolution
Workaround
As a workaround, update Wordpress Core/Themes/Updates for instances affected via CLI.
-
Connect to the server via SSH
-
Find instance ID (in the case below it is 2):
# plesk ext wp-toolkit --list
ID Main Domain ID Main Domain's Path Owner ID Alive Site URL Name Version
2 1 /httpdocs/wordpress 1 true https://example.com/wordpress My CMS 5.5.1 -
Update Wordpress Core/Theme/Updates:
Run the following command:
# plesk ext wp-toolkit --wp-cli -instance-id 2 -- core update
-
Find installed plugins:
# plesk ext wp-toolkit --wp-cli -instance-id 2 -- plugin list
+-------------------------+----------+--------+---------+
| name | status | update | version |
+-------------------------+----------+--------+---------+
| akismet | inactive | none | 4.0.3 |
| autoptimize | active | none | 2.3.4 |
| hello | inactive | none | 1.7 |
| hummingbird | active | none | 1.8.0.4 |
+-------------------------+----------+--------+---------+ -
Update the plugin desired using the the plugin_name:
# plesk ext wp-toolkit --wp-cli -instance-id 2 -- plugin update plugin_name
-
Find installed themes for the desired instance:
# plesk ext wp-toolkit --wp-cli -instance-id 1 -- theme list
+-------------------------+----------+--------+---------+
| name | status | update | version |
+-------------------------+----------+--------+---------+
| twentynineteen | active | available | 1.5 |
| twentyseventeen | active | available | 2.3 |
| twentytwenty | inactive | available | 1.2 |
+-------------------------+----------+--------+---------+ -
Update the theme using the theme_name:
# plesk ext wp-toolkit --wp-cli -instance-id 2 -- theme update theme_name
Comments
0 comments
Please sign in to leave a comment.