ProcessWire core updates (2.5.10)

Introducing the ProcessWire Config Admin Module

This week a new configuration method was added that enables you to modify most of ProcessWire's configuration settings directly in the admin, rather than manually editing the /site/config.php file. This includes more than 30 configuration properties. The module that does this is called ProcessWireConfig. The core has been updated to support it with version 2.5.10.

There are a lot of situations where this module could be useful. Quickly enabling (or disabling) debug mode for example, or modifying your admin thumbnail image settings as another. But you can modify nearly any configuration setting. Further, you can also use the tool to define your own (more on that later).

The actual ProcessWireConfig module has not yet been merged into the core, though likely will be soon (if ProcessWire users think it will be useful on most sites). If you'd like to give it a try now, just grab ProcessWire 2.5.10 and install the module directly from the ZIP. Your feedback is appreciated.

The module works by parsing the /wire/config.php file directly to determine what properties are configurable. As a result, if a new configurable property is added to /wire/config.php, then ProcessWireConfig will also pick it up as editable.

Define custom config properties

The module also parses your site's custom /site/config.php file looking for configurable properties. If it finds any, then you'll have a new "Site" tab appear when using this module. Each $config property has to be commented in phpdoc format in order to be recognized (with at least a @var line). There are also several custom attributes that can be added to provide more information about the configuration property to ProcessWireConfig. See the current /wire/config.php for several examples. Most of the custom attributes identified by ProcessWireConfig start with a # within the phpdoc.

However, you don't have to use your /site/config.php file to define custom properties if you don't want to. You can actually define them right on the ProcessWireConfig module configuration screen. Currently it's just limited to defining basic text and checkbox fields here, but we'll add more options if there's interest.

Comments

  • NorbertH

    NorbertH

    • 9 years ago
    • 32

    Simply great work!

    Not sure if this need to be in basic core but i really like the concept of parsing and editing the config file. It fits perfectly into the concept of having a CMF that offers a nice interface in addition to an interface independent core functionality.

    Feels like Linux , feels like home :-)

  • Adrian

    Adrian

    • 9 years ago
    • 42

    I really like what you did for updating the config.php file. Te addition for custom properties it's a huge plus. Keep up the good work !!!

 

Latest news

  • ProcessWire Weekly #490
    In the 490th issue of ProcessWire Weekly we'll check out what's new in the latest core version ProcessWire 3.0.229, introduce a brand-new third party module, and more. Read on!
    Weekly.pw / 30 September 2023
  • ProcessWire 3.0.226 new main/master version
    After 8 months in development we are excited to bring you ProcessWire 3.0.226 main/master. This version has a ton of great new features, improvements and optimizations, plus more than 100 issue fixes. This post takes an in-depth look at highlights from this great new version.
    Blog / 25 August 2023
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits