Manage Plesk branding using CLI or through database

Created:

2016-11-16 12:50:19 UTC

Modified:

2017-06-01 20:23:38 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Manage Plesk branding using CLI or through database

Question

Is there any CLI utility to manage Plesk branding?

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. Please 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
# plesk bin branding_theme --set -name customtheme

 

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:

  1. Put the desired image into /usr/local/psa/admin/htdocs/images/logos/ directory.

  2. 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 |
    +------+
  3. 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

For information about working with custom themes, refer to Advanced Administrator Guides for Linux.

Plesk Branding CLI utility syntax is available in Command Line Utilities Guide .

 

 

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