Change or set just the server disk path for the named location (leaving URL as-is)
If you want to update both disk path and URL at the same time, or if URL and path are going to be the same relative to installation root, use the
Paths relative to PW installation root should omit the leading slash, i.e. use
$forargument can be:
templates, or one of your own. Other named locations may also work, but since they can potentially be used before PW’s “ready” state, they may not be reliable.
Available since version 3.0.141.
$self = $config->setPath(string $for, string $path);
Named location from
Path relative to PW installation root (no leading slash), or absolute path if not.
Method can throw exceptions on error:
API reference based on ProcessWire core version 3.0.160