9 replies
Hi,

I have a WP site that I was just about to add some content to but when I tried to get to the site this came up:

Fatal error: Call to undefined function wp() in /home/myname/public_html/mydomain.com/wp-blog-header.php on line 14

What is this and is it an easy fix? :confused::confused:

Thank you for your help.

Regards

Karen (technical dummy...)
  • Profile picture of the author HonestCoder
    Do you have a file called wp-config.php and did you edit it recently? It's likely that file is causing this error. A few things to try...

    • Check you have that file and that it's permissions are set to 755 (you can check that by right clicking the file in a FTP program and look for something like 'permissions' on the menu).

    • Double check your database info is exactly right.

    • There could possibly be some extra characters in that file that you don't want, make sure there's nothing at the top of the file before <?php

    • You could try deleting (or rename it if you want to keep it) and re-creating wp-config.php. There's a file called something like wp-config-sample.php if I remember correctly that you can copy and edit.

    • It could even be something to do with line ending characters, depending on which text editor you used to edit it. Maybe try saving it with a different text editor.

    • Upload wp-config.php with your FTP program in 'binary mode'. That way, if there are any weird characters in the file it will still upload without being corrupted.

    That's all I have for now
    {{ DiscussionBoard.errors[6084945].message }}
  • Profile picture of the author Earnie Boyd
    Karen, have you resolved this issue? I see you thanked HonestCoder but you didn't give feedback as to if what was suggested resolved your issue.
    Signature
    {{ DiscussionBoard.errors[6085048].message }}
  • Profile picture of the author Karen Connell
    Was just having a look at the files :confused:.

    There doesn't seem to be anything at all in the wp-config.php file.

    (I checked another WP sites files to see what should be there)

    That file was edited on 16th April - but not by me (unless I had a 'senior moment'), I haven't done anything with it recently.

    I'm not too worried about it because it is not a money making site but I would love to know how this happened.

    My other sites within my cpanel are all OK.

    Thank you for any suggestions.

    Karen
    Signature

    Never Mistake Activity for Accomplishment

    {{ DiscussionBoard.errors[6085126].message }}
    • Profile picture of the author HonestCoder
      Hi Karen,

      That's why I asked if you edited it recently. An error like that doesn't usually just happen to a working site unless someone changed something.

      You might want to make a note of the time the file was last edited then contact whoever hosts your site and ask them to check the logs for you around that time. If someone has been playing around with your server you need to know about it.

      To get that file back, if you don't have a back up, look for wp-config-sample.php, it should contain what is supposed to be in wp-config.php. Just edit it with your database info and make sure it's renamed to wp-config.php and you should be ok. Hope that helps
      {{ DiscussionBoard.errors[6085235].message }}
  • Profile picture of the author Earnie Boyd
    And if you have an older version of WP you should upgrade. Keep up with the upgrades for security reasons. Change you passwords on your site. Make sure you use the Wordpress security modules to help with keeping your site safer.
    Signature
    {{ DiscussionBoard.errors[6085415].message }}
  • Profile picture of the author Karen Connell
    Thank you both - I love Warrior Forum

    Regards

    Karen
    Signature

    Never Mistake Activity for Accomplishment

    {{ DiscussionBoard.errors[6085474].message }}
  • Profile picture of the author soldoni
    Ya really.. I also loving it....Well
    {{ DiscussionBoard.errors[6085643].message }}
  • Profile picture of the author olalinks
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[6085661].message }}
    • Profile picture of the author Karen Connell
      Originally Posted by olalinks View Post

      Maybe you installed some plugins which cause this problem.
      Remove them.
      No new plugins installed but thank you for the suggestion.

      Karen
      Signature

      Never Mistake Activity for Accomplishment

      {{ DiscussionBoard.errors[6086803].message }}
  • Profile picture of the author JayWiz
    Here is how to fix:
    1. Find out your wordpress version.
    2. Download the same version from Download › Release Archives
    3. Find the wp-blog-header.php in the archive and replace the one on your site using ftp upload.
    4. If still fail, try updating your wordpress to recent version.
    {{ DiscussionBoard.errors[6091266].message }}

Trending Topics