WordPress PHP Fatal Error: Call to undefined function
was posted on April 24th, 2010 skyline • 3,599 views
Did you receive a PHP Fatal error: Call to undefined function is admin() in /home/directory/public_html/wp-includes/vars.php on line 16?
… Can’t login to WordPress Admin? Has your WordPress site disappeared? Wonder … have my files been corrupted?
These are all good questions and most likely you answered yes to one or more of them … and that’s how you found this page.
So, what do I do? How do I get my WordPress site back? How do I recover without losing everything?
Well, fortunately you just backed up your WordPress files earlier today and you can delete all your WordPress files except your wp-config.php file and the wp-content folder; and then upload the files you backed up, right? You didn’t back your files up earlier? Okay … do you have the same version of WordPress files on your computer as you had installed? Or, had you upgraded your installation and have a different version of WordPress on your computer?
It might be this actually happened while you were upgrading from one version to another. Or it could have happened when you were attempting to upgrade a plugin, when you didn’t read the details first. You may have been upgrading WordPress and did not deactivate your plugins first. If either of these scenarios sound familiar, you are probably trying to figure out how to fix this mess. It could be that one of your plugins is incompatible with the newer version of WordPress, too.
Let’s start with first things first. If you do not have all the WordPress files on your computer which you had on your server, you can get a copy of whatever version you had installed by going to the WordPress Download Release Archive. Download the version you need, if applicable. As you get ready to fix the problem, an important caveat is DO NOT overwrite your wp-config.php file because it contains your database name, database username, database password and without this information you will not connect to your WordPress database. That would not be good.
If you delete all the WordPress files on your server, except wp-config.php and the folder wp-content you will be ready to upload the former version that was working. However, depending upon what you were doing when this error occurred, you might also want to consider adding one more step. Create a new folder outside of your WordPress installation and move all your plugin folders to the new folder you created. Now upload the WordPress folders and files and you should have access to your site again.
If you were not upgrading plugins when this happened, you should be able to move your plugin folders back and then reactivate each plugin. On the other hand, if you were upgrading a plugin when this happened you may need to locate the prior version of the plugin and upload it instead. Once you have your site back, make sure to back it up and backup your database, too.
Now, if you were trying to upgrade your WordPress version, make sure to deactivate all your plugins. With current backups, the other consideration is whether or not your WordPress theme will work well with the newer version of WordPress. If you can verify it is compatible, then go ahead and try it again. Once you upgrade, you should be able to reactivate your plugins. You may want to activate them one by one and check to make sure your site is working okay after each plugin activation. This will help you isolate a problem plugin.
If this was helpful, let me know.








2_03.gif)

Tag Cloud


Vivian …
That’s a lot of questions. But, all is probably not lost.
Unfortunately I did overwrite those files. The site is now unconfigured and I still cannot log in. Any suggestions?
When I hit the admin link I get:
Fatal error: Call to undefined function akismet_server_connectivity_ok() in /home1/sandrapa/public_html/wp-content/plugins/akismet/admin.php on line 268