Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Custom Settings

 
extensions guideplesk features available for extensionsretrieve data from pleskcodingextensions

Plesk SDK API provides the ability to customize the behavior of
extensions editing the
panel.ini
configuration file.

You can add values to panel.ini for extensions to read. They are
intended to be read-only, and end users should rarely change them. For
example, you can configure the “connectionTimeout” value in
panel.ini instead of hard-coding it. To specify one or more values
to be read by a specific extension, add a section to the file starting
with [ext-<extension-id>], where <extension-id> in the id of the
extension. Consider the following example:

[ext-custom-config]
timeout = 1200
homepage = "https://another-url.com"

Here, the values for timeout and homepage are specified, and
they will be read only by the extension with the id “custom-config”.

Reading the values from the configuration file is implemented via the
pm_Config
class.

Storing the default settings is optional and is implemented via a hook
class implemented within the scope of an extension. The class should be
located at plib/hooks/ConfigDefaults.php and extend
pm_Hook_ConfigDefaults.

Nested configuration settings are not supported.

Examples

Reading values from the configuration file

$timeout = pm_Config::get('timeout');
$homepage = pm_Config::get('homepage');

Providing the default settings

In the plib/hooks/ConfigDefaults.php file:

<?php
// Copyright 1999-2016. Parallels IP Holdings GmbH.
class Modules_CustomConfig_ConfigDefaults extends pm_Hook_ConfigDefaults
{
    public function getDefaults()
    {
        return [
            'homepage' => 'https://plesk.com/',
            'timeout' => 60,
        ];
    }
}

A sample extension demonstrating the principle can be found
here.

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Podcast | Forging Your Own Web Development Path with Tracy Apps

Read More »

Getting Started With Plesk Extensions & Tools

Read More »

The Plesk WP Toolkit 5.6 Release – What’s New

Read More »
Knowledge Base

Available Licensing Models – Freemium Extensions

Read More »

Issuing Custom Licenses for Extensions

Read More »

Extensions Reference

Read More »

Testing Extensions

Read More »

Hosting Wiki

  • Encoding
  • PhpMyAdmin
  • phpPgAdmin
  • JavaScript
  • PHP
  • Plesk
  • IPv6
  • IPv4
  • SIP
  • UDP/IP
  • URL
  • TCP/IP
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family