Skip to content

M2.3.7 Change custom maintenance page title

I want to change the page title of my custom maintenance page.

I already found out that the title is set hard in pub/errors/processor.php in the Processor::process503() method.

The $pageTitle member is public so I would be able to set it from outside of the object, weren’t it that the method returns a MagentoFrameworkAppResponseHttp object directly.

processor.php:

public function process503()
{
    $this->pageTitle = 'Error 503: Service Unavailable';
    $this->_response->setHttpResponseCode(503);
    $this->_response->setBody($this->_renderPage('503.phtml'));
    return $this->_response;
}

503.php:

There’s no place here where I could set the $pageTitle member from outside because process503() will overwrite it.

require_once 'processorFactory.php';

$processorFactory = new MagentoFrameworkErrorProcessorFactory();
$processor = $processorFactory->createProcessor();
$response = $processor->process503();
$response->sendResponse();

Is there any way I can change the page title without editing core files?