I just tried to update Craft to 3.1.1 from within the CP. The install failed and I got an Internal Server 500 error. I now can't load either the front or backend of the site, I get a 500 error in both cases. The phperror log shows these errors:

[18-Jan-2019 06:03:54 America/Los_Angeles] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 14680096 bytes) in /home/vps/proto.site.com/craft/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php on line 300
[18-Jan-2019 06:03:54 America/Los_Angeles] PHP Fatal error:  Uncaught yii\base\InvalidRouteException: Unable to resolve the request "templates/render-error". in /home/vps/proto.ibiscycles.com/craft/vendor/yiisoft/yii2/base/Module.php:537
Stack trace:
#0 /home/vps/proto.site.com/craft/vendor/craftcms/cms/src/web/Application.php(284): yii\base\Module->runAction('templates/rende...', Array)
#1 /home/vps/proto.site.com/craft/vendor/yiisoft/yii2/web/ErrorHandler.php(108): craft\web\Application->runAction('templates/rende...')
#2 /home/vps/proto.site.com/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(132): yii\web\ErrorHandler->renderException(Object(yii\base\ErrorException))
#3 /home/vps/proto.site.com/craft/vendor/yiisoft/yii2/base/ErrorHandler.php(262): craft\web\ErrorHandler->renderException(Object(yii\base\ErrorException))
#4 [internal function]: yii\base\ErrorHandler->handleFatalError()
#5 {main}
  thrown in /home/vps/proto.site.com/craft/vendor/yiisoft/yii2/base/Module.php on line 537

I have successfully updated Craft via the CP over the last couple of months, this is the first time it's failed. I also updated the php.ini memory_limit to 512M (from 256M) and the max_execution_time to 300 (from 30) after the update failed but I still can't view either the front end or CP.

I'm in the middle of migrating a site from Expression Engine to Craft, this is kind of worrying! I've never see a complete failure like this without any indication of what the problem is.

Thanks for any help.

1 Answer 1


The error message indicates your php.ini file's memory_limit setting is still sitting at 256M (268435456).

Double check you've bumped it up to 512M and you're editing the correct php.ini file for the site.

From there, the quickest way to get the site back up and running is if you have Composer installed from the command line, to nuke your vendor folder and composer.lock file, then run composer update from your project's root to pull in a fresh set of Craft's dependencies.

To be safe, you'll probably also want to restore your database from a pre-update attempt database backup as well (you can't be sure at what point the original fatal error occurred during the update process).

  • I'm back up and running after following the process you suggested. I did have to revert to an earlier database backup as the failed installation didn't generate a database backup prior to the fatal error. It'd be super useful to include this information as a "If the update process fails..." in the official documentation. And thanks for helping out!
    – shandy
    Commented Jan 19, 2019 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.