Call to undefined function: wp()

I came across a frustrating bug today that has a pretty simple solution. I had an installation of WordPress that had been created by Fantastico. I needed to modify wp-config.php, but once I saved it back to the server WordPress just refused to start. It returned the following error:

Call to undefined function: wp() in wp-blog-header.php

Anyway, I tried a number of different things to resolve the issue and almost ended up tearing my hair out, but in the end I managed to resolve it. Turns out that the line endings in the wp-config.php file created by Fanstastico aren’t standard CR/LFs. When I opened the file up in Notepad2, my text editor of choice, they appeared to me “Mac-type” line terminations. Setting these to normal CR/LFs and deleting any extra lines at the end of the file resolved the issue.

6 thoughts on “Call to undefined function: wp()

  1. hi

    i have the same problem

    i don´t have notepad2, i use dreamweaver on a mac os x

    do u think I can do something. I´m getting crazy to install wordpress on my webserver

    cheers mate

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>