Applicable to:
- Plesk for Linux
How to manage Plesk branding using CLI or through database?
Answer
I. Changing Plesk Branding through CLI:
1. Download the default theme:
# plesk bin branding_theme -p -name default -destination '/theme/defaullttheme.zip
2. Unpack it and modify meta.xml, replace ./images/logos/plesk/logo-web-host.png with a custom image. Note that the theme directory structure should be kept.
3. Zip the theme back, install and activate it:
# zip -r customtheme.zip ./
# plesk bin branding_theme --install -vendor admin -source customtheme.zip
When the theme is installed, it is automatically applied to UI. To apply another theme that was installed previously, use the
--set
command:
# plesk bin branding_theme --set -name customtheme
For information about working with custom themes through CLI, refer to Plesk Administrator Guide .
II. Changing Plesk Branding through database
Before modifying database, create PSA database backup according to instructions here:
- 213904125 How to backup/restore a Plesk database dump?
To change Plesk Title, use the following query:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "update misc set val='MyTitle' where param='custom_title';"
To change Plesk Logo and URL attached to it, use the following instructions:
-
Put the desired image into
/usr/local/psa/admin/htdocs/images/logos/
directory. -
In Plesk database, check which ID the logos have:
mysql> select val from misc where param='logo_id';
If there are no any entries, any ID can be used for updating database. If there is an output like below, use ID that is specified (val=2):
+------+
| val |
+------+
| 2 |
+------+ -
Update the database:
mysql> replace Logos set `id`='2', `name`='image.png', `fake`='image.png', `url`='http//example.com';
mysql> replace into misc (param, val) values("logo_id", "2")
Additional information
Plesk Branding CLI utility syntax is available in Command Line Utilities Guide .
Comments
0 comments
Please sign in to leave a comment.