Support » Fixing WordPress » Fatal error: Call to undefined function get_header() on new installation

  • Resolved toomanyjacksons


    I have just installed wordpress and when I go to view my site I get Fatal error: Call to undefined function get_header() in /**/***/wp/wordpress/index.php on line 1.
    I have all the files transferred over and have a header.php file and index.php is the call to the header file on line 1.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I just re-ftp’s the files (all the files) and nothing. If this does not get resolved how do I uninstall this product? delete the files and remove everything with wp-*** in the database? Not very happy with wordpress so far.




    the trouble is not with wordpress, its with what you have done.

    the index.php that resides in the same directory as your wp-config.php should NOT contain any reference to that function.

    What does contain a reference to that function are the index.php files that are used for themes.

    That means that you have uploaded the one of the themes’s index.php files to the root of your install. That’s typically done as a result of NOT maintaining the directory structure that seen in the zip, either while unpacking the files, or uploading them.

    You need to pay better attention to what you are doing before immediately casting doubts on the software that you have chosen to use.

    What do you do now?

    You delete the files you have uploaded, except for any edited wp-config.php

    You unpack the zipfile that you have downloaded from the download page — making sure that after its unpacked you have a structure, and not a bunch of loose files. There ought to be a wp-admin folder, a wp-includes folder, and some more sub-folders.. there are 22 loose files that are in the same folder with wp-config-sample.php.

    If you dont have that, you need to master using whatever program you are you using to unzip, before tackling wordpress.

    You then upload the files, maintaining that same directory structure.

    Once you have done all of that correctly, you wont see that error.

    Furthermore, since you took the time to complain about slow responses in this forum in someone else’s thread.. You could have looked a little harder for similar topics, and located a nearly identical yet less detailed answer. Believe it or not, youre not the first person to have done this. <– took me 2 mins to find that, and I didnt use my own name in the search.

    I actually spent quite some time looking and found many posts saying to re-load the files, this, your reply, was the first one to mention that extra files on the root might be the problem, so deleting files was the answer…I thank you for your reply and have checked out the reference which is not quite the problem that I had as simply as I had it, but at least it is resolved, thank you again….although you do seem a little tense!

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