• Resolved gabigatzki

    (@gabigatzki)


    Hello, I am new to wordpress and I am trying to run it on the XAMPP machine i have installed on my computer, and for some reason when I run my index.php file it says the following: “Fatal error: Call to undefined function get_header() in C:\xampp\htdocs\wordpress\index.php on line 1”.

    What I have done:
    I have installed XAMPP v3.2.1 and started the apache and mysql, both are over a green background so they seem to be running fine.
    Next I opened localhost in my browser and created a new database named wordpress. I then downloaded wordpress v4.0 and unziped it into htdocs, then i changed the file wp-config-sample.php to be named wp-config.php and changed the database name to ‘wordpress’, username to ‘root’ and password to ”.
    Now i tried going to https://localhost/wordpress and it seems to work fine i have an hello world there and some example template.
    Then i tried creating my own files. I modifyed index.php to be the following code:

    <?php get_header() ?>
    <div id=”main”>
    <div id=”content”>
    <h1>Main Area</h1>
    </div>
    </div>
    </body>
    </html>

    and created an header.php file which looks like this:

    <html>
    <head>
    <title>Tutorial theme</title>
    </head>
    <body>
    <div id=”wrapper”>
    <div id=”header”>
    <h1>HEADER</h1>
    </div>
    </div>

    I and now when i go to https://localhost/wordpress/ it showed me the error message I stated in the beginning of this post, Im not sure what im missing here and why wont it work.

    Thanks in advance for any help, and sorry for the long post,
    Gabi.

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress problem over XAMPP’ is closed to new replies.