Has anyone had any luck getting ExpressionEngine 2.x working with nginx and/or PHP7? I have a CentOS 7 server with PHP7 and nginx installed. I have another site hosted on the server that runs just fine. A simple "hello world" example written in PHP will work but any attempt to load ExpressionEngine results in a 500 error. Tailing the logs isn't leading me to anything useful (I've checked logs for php-fpm and nginx).

Any advice? Here's the config that is working for me on another site (running Laravel 5):


I've tried the recipes here, but nothing seems to stop the 500 errors from happening: https://www.nginx.com/resources/wiki/start/topics/recipes/expressionengine/

2 Answers 2


Try changing the PHP MySQL driver. Previous versions of EE use mysql but for php7 you need to change the setting to mysqli.

Find the setting in the /system/expressionengine/config/database.php file.


$db['expressionengine']['dbdriver'] = 'mysql';


$db['expressionengine']['dbdriver'] = 'mysqli';
  • 1
    is correct, it does work under PHP7 (tested with EE v2.11.1), but you need to set the database driver: $db['expressionengine']['dbdriver'] = 'mysqli'; Make sure you clear your EE cache and you might find that third-party add-ons are not compatible - so work through them. I know P&T Field pack stuff throws errors. Mar 28, 2016 at 11:16
  • This fixed my issue. Mar 29, 2016 at 0:01
  • After messing around with PHP extensions this was the fix for getting EE 2.11.7 functioning under PHP 7.0 Mar 29, 2017 at 16:33

It looks as though only EE3.1 has full php 7 compatibility: https://ellislab.com/blog/entry/expressionengine-3.1.2-released#fn:php-7

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.