Hi everyone! I’m new here, so I appreciate your patience. I noticed yesterday that I can no longer log into the admin area of my site; it gives a fatal error. The public site is still up and running fine.
I used phpMyAdmin to disable all the plugins and switch to a standard theme, which worked well, but it didn’t resolve the login issue. I also didn’t receive the email that was supposed to come with the error message. Even when I visit my site, I can see the admin bar, but clicking on anything there just brings up the fatal error again.
I enabled debug mode and got this error message:
“`
Fatal error: Uncaught Error: Call to undefined function create_function() in /mnt/web206/c2/26/53922126/htdocs/WordPress_02/wp-config.php:90 Stack trace: #0 /mnt/web206/c2/26/53922126/htdocs/WordPress_02/wp-load.php(50): require_once() #1 /mnt/web206/c2/26/53922126/htdocs/WordPress_02/wp-admin/admin.php(34): require_once(‘…’) #2 /mnt/web206/c2/26/53922126/htdocs/WordPress_02/wp-admin/index.php(10): require_once(‘…’) #3 {main} thrown in /mnt/web206/c2/26/53922126/htdocs/WordPress_02/wp-config.php on line 90
“`
I’ve found out that `create_function` is related to features that aren’t supported in newer PHP versions. I’m currently using PHP 8.1, and I can only downgrade to 8.0, which doesn’t fix the issue. It’s possible the problem has been around for a while, but I hadn’t needed to access the backend until now, so I’m not sure.
Since I’m a total beginner, I would really appreciate any explanations in simple terms. Thank you!
I recently encountered a fatal error: Uncaught Error: Call to undefined function create_function() on my WordPress site, which caused the site to crash. I reached out to EloClouds’ Managed WordPress Support, and here’s how they helped:
create_function()
is deprecated in PHP 7.2+). I had recently upgraded my site’s PHP version, which triggered the error.create_function()
with anonymous functions, which is the proper solution for compatibility with newer PHP versions. They also checked my plugins and theme to make sure no other deprecated functions were causing issues.Overall, the support from EloClouds was fast, professional, and effective in resolving the issue. My site was back online quickly without me having to dive into the technical details myself!
Hello where is you wordpress hosting?