Migrated wordpress site give “Undefined variable: php” warnings

Notices won’t trigger a server 500 error. However, “fatal errors” will. From your logs above:

Fatal error: Class 'Memcache' not found in /var/www/wordpress/wp-content/plugins/flexicache/FlexiCache/Store/Memcache.php on line 63

This means you’re running a plugin that depends on Memcache and your local system doesn’t have Memcache support. Disable or remove the FlexiCache plugin, or install Memcache.


One other important thing to remember is that simply installing Memcache on your server isn’t usually enough. PHP has to be compiled with support for it, or you need to manually load the PHP’s Memcache extension. It’s not bundled with PHP by default, though some hosts might install it for you.