Support » Fixing WordPress » Undefined function wp() in wp-blog-header.php

  • Hi all,
    Just upgraded my WordPress to 2.6.2, and now trying to access the site I get the error:

    Fatal error: Call to undefined function wp() in /home/cmdrfire/www/blog/wp-blog-header.php on line 14

    Going to /blog/wp-login.php I get the error:
    Fatal error: Call to undefined function force_ssl_admin() in /home/cmdrfire/www/blog/wp-login.php on line 15

    Seems to suggest that a file is missing, but I have checked everything and all files were uploaded (I use Filezilla, reuploaded 2 times, and have checked “by hand” that files are uploaded).
    I am using PHP5. Help?

Viewing 15 replies - 1 through 15 (of 18 total)
  • First, open up your wp-config.php in the root of your WP install and check to see whether you have space at top before <?php or extra spaces at the end after ?> and delete those spaces. Check for missing opening and ending characters as well < and/or > and add them.

    Thread Starter cmdrfire

    (@cmdrfire)

    I removed the contents of my wp-config.php file and copied in the contents from the wp-config-sample.php, updating with my information, which resolved the issue somewhat. I can’t log in now, and the page only partially loads. Thanks for your help though!

    FTP Re-upload individual WordPress files for the root directory

    Thread Starter cmdrfire

    (@cmdrfire)

    Tried that, no joy.
    You can see what’s happening here:
    http://www.cmdr-fire.co.uk/blog/

    Ok, now that’s different. Did you just upgrade or add/delete a plugin? Also, have you tried to change your theme to default or classic and do you see the content there when you change the theme?

    Thread Starter cmdrfire

    (@cmdrfire)

    I just upgraded the site using the upgrade guide – make backup, disable plugins, delete wp-admin and wp-includes and replace, and then update wp-content and the files in the root directory. Unfortunately I can’t log in to change the theme, it opens the login page but entering my crendentials and pressing “login” results in nothing happening.

    If I change the name of the currently-activated theme directory will it revert back to the original theme?

    Yes, in FTP rename your custom theme folder and it will revert to default theme.

    Thread Starter cmdrfire

    (@cmdrfire)

    Renamed custom theme folder, I’m just getting a blank page now. Same problem when I try to login (/wp-login.php) as well, I enter my credentials, press Log In, it seems like a page is loading and nothing happens.

    Thread Starter cmdrfire

    (@cmdrfire)

    Anyone got an idea?

    Why do you have a redirect from your root to the /blog directory? Remove it.

    Thread Starter cmdrfire

    (@cmdrfire)

    Because my weblog is at /blog?
    In any case, I semi-resolved the issue by overwriting wp-admin, wp-includes, and the root wordpress files in /blog/ with those of wordpress 2.5.1. I then performed an upgrade of the database… with the result that my posts work:
    http://www.cmdr-fire.co.uk/blog/

    But little else. When I try to log in now, or go directly to wp-admin, I get a Redirect Loop warning (Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked.) in Firefox.

    Did you disable plugins before upgrading?
    – If you cannot access your wp-admin, download folders of plugins to hard drive to save. rename/delete plugin folders/files in server FTP.
    – Rename your customized theme folder to automatically revert theme to default
    – Login

    Thread Starter cmdrfire

    (@cmdrfire)

    I did disable plugins prior to upgrading, but I’ll try what you suggest (backing up plugins/rename folder/rename theme).
    Thanks.

    Thread Starter cmdrfire

    (@cmdrfire)

    Still no joy, just a blank page. I put back the theme because at least that way my posts are displaying. Still can’t log in, redirection warning keeps appearing.

    Thread Starter cmdrfire

    (@cmdrfire)

    Bump, anyone got a clue? I still can’t log into admin and the sidebar is not working, but the site seems to be running and I’ve gotten a million spam comment emails as all plugins are disabled :/

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Undefined function wp() in wp-blog-header.php’ is closed to new replies.