Fatal error on successfully imported site

What issue or error are you experiencing?

Website imported successfully. When I visit the link the following error msg appears (xxx replace personal info):
" Fatal error : Uncaught Error: Call to undefined function create_function() in /Users/XXXXX-XXXXXXXXXX/Local Sites/XXXXX-m-wp-archive/app/public/wp-content/themes/XXXXXXXXXX/functions.php:31 Stack trace: #0 /Users/XXXXX-XXXXXXXXXX/Local Sites/XXXXX-m-wp-archive/app/public/wp-settings.php(695): include() #1 /Users/XXXXX-XXXXXXXXXX/Local Sites/XXXXX-m-wp-archive/app/public/wp-config.php(103): require_once(‘/Users/XXXXX-XX…’) #2 /Users/XXXXX-XXXXXXXXXX/Local Sites/sonia-m-wp-archive/app/public/wp-load.php(50): require_once(‘/Users/XXXXX-XX…’) #3 /Users/XXXXX-XXXXXXXXXX/Local Sites/XXXXX-XX-wp-archive/app/public/wp-blog-header.php(13): require_once(‘/Users/XXXXX-XX…’) #4 /Users/XXXXX-XXXXXXXXXX/Local Sites/XXXXX-m-wp-archive/app/public/index.php(17): require(‘/Users/XXXXX-XX…’) #5 {main} thrown in /Users/XXXXX-XXXXXXXXXX/Local Sites/XXXXX-m-wp-archive/app/public/wp-content/themes/XXXXXXXXXX/functions.php on line 31


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @smng

The fatal error is calling out your theme so it could be in conflict with a plugin or some other part of the site’s configuration. For example did you create the Local site using the same WP/PHP/MySQL/server settings as the live site?

You can click on Site Shell under your Local site’s name in order to use WP-CLI commands to swap the theme or disable plugins as a workaround to get you in as well.