Support » Fixing WordPress » Fatal error: Call to undefined function wp()

  • Resolved Juuth


    Dear peoples,

    Upon moving a client’s website to a new domain, i got the following msg:

    Fatal error: Call to undefined function wp() in /srv/kinders/www/ on line 14

    I looked it up and found it could have to do with line endings in config.php. I copied and pasted the code from the working config.php (replacing db info) using TextEdit on a Mac, but the same msg keeps popping up.

    Here’s the working website on a testing domain: And here’s the one not working:

    Really appreciate any help.



Viewing 6 replies - 1 through 6 (of 6 total)
  • Update: issue is not resolved yet! So even if you do see a website at the url mentioned, it’s just a redirect.

    Please, if anyone could have a look and help me out… thanks sooo much.


    The link show the file permission error, which is an apache issue,change the chmod to 755 and try..

    Thank you Rakesh, i know this. it is because i was shifting the files looking for a solution. If you check back in now, you’ll see the fatal error though.

    My hosting provider noticed that some files are DOS or even noeol type. I looked through other forum posts addressing this fatal error and think the problem may be in these file types. I suspect the file types are being changed while uploading via ftp, but i have no clue how to influence this.

    Thank you very much for wanting to help me out Rakesh!


    add these two lines at the end of wp-config.php
    define(‘WP_SITEURL’, ‘’);
    define(‘WP_HOME’, ‘’);
    hope it works

    🙂 i also found this solution and tried it before. Tried it again now, but still get the same error. Thanks anyway. Any ideas on the file types?

    Dear people,

    I got this one resolved with help from my hosting provider. He noted file types were different in the new install to what they were in the testing install. The file types must have been changed somewhere in the process of moving the files. I don’t know how it happened yet, but am very happy with my host solving this for me by moving the files again, this time retaining file types.

    Hope this helps any of you with the same problem. Kudos to Rakesh as well for trying to solve the issue.

    Happy blogging!


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Call to undefined function wp()’ is closed to new replies.