Unlikely Teacher

1. Share Everything* [Programming Gotchas, Technology News, Insights on Living and Everything in Between]

Fatal error: Call to undefined function wp_dashboard_setup()

March 24th, 2010 · 5 Comments · PHP

I got this error in WordPress this morning when trying to logon to the Admin pages:

Fatal error: Call to undefined function wp_dashboard_setup() in /home/username/public_html/wp-admin/index.php on line 15

I didn’t make any changes or upgrades to the site and the weird part is that all of a sudden, two of our WordPress installations were displaying this error.

UPDATE: March 24, 10:12 PM GMT+8 It looks like the problem is related to A2 Hosting changing the default PHP version (see Neil’s post in the comments section).

I did some Googling and found a workaround.

The solution is to change this line in wp-admin/index.php:

require_once(ABSPATH . 'wp-admin/includes/dashboard.php');

to this line:

require_once('./includes/dashboard.php');

I’m still trying to investigate the cause of the problem but in the meantime, hope this quick fix solves your problem.

Thanks to Florent for sharing his solution. And thanks also to Neil for providing the reason for the error and a better approach to handling the problem for those who are with A2 Hosting.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • Reddit
  • StumbleUpon
  • Tumblr
  • Twitter

Tags: ·

5 Comments so far ↓

  • vijay vinoth

    Thanks yar its working fine.Thanks for your useful information.

  • Louis

    HI – I had the same problem – started out of nowhere last night! My wordpress blog is on A2Hosting.com – is yours? While making that change did fix my problem with getting to my Dashboard, it left another problem for me…. I can not get to my Widgets! Go click on Widgets and see if that works for you. Let me know what you did to fix it if you fixed it… THANKS!

  • Neil

    If you’re with a2hosting, here’s what happened:

    A2 Hosting upgraded their servers yesterday to allow a choice of php versions. Evidently the new default PHP version is not entirely compatible with WordPress.

    The new default PHP Version is 5.2.9 Cached, which is what caused the error message. After changing it to the second option: 5.2.9 Zend Optimizer” the error went away.

    To change your version, go here: CPanel -> Software/Services -> PHP Version -> 5.2.9 Zend Optimizer

  • paul

    This is great Neil! Thanks for this very useful information. And yes, I am on a2. :) Better check all the sites we have deployed…

  • paul

    @Louis, I don’t see the Widget problem that you’re getting. How about trying the suggestion from Neil to change the default PHP version?

Leave a Comment