Title: WordPress problem over XAMPP
Last modified: August 22, 2016

---

# WordPress problem over XAMPP

 *  Resolved [gabigatzki](https://wordpress.org/support/users/gabigatzki/)
 * (@gabigatzki)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/)
 * 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 [http://localhost/wordpress](http://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 [http://localhost/wordpress/](http://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)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292781)
 * I would expect your error message to point to a file in your “themes” directory,
   how come you’re editing a file at root?
 *  Thread Starter [gabigatzki](https://wordpress.org/support/users/gabigatzki/)
 * (@gabigatzki)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292783)
 * Just wanted to play with it for a little bit to see that everything works.
    I
   also tried running an existing theme(I think) [http://localhost/wordpress/wp-content/themes/twentyfourteen/](http://localhost/wordpress/wp-content/themes/twentyfourteen/)
   and i get this message: Fatal error: Call to undefined function get_header() 
   in C:\xampp\htdocs\wordpress\wp-content\themes\twentyfourteen\index.php on line
   17
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292785)
 * I think you may have replaced the index.php file in your root directory. It should
   be this: [https://github.com/WordPress/WordPress/blob/master/index.php](https://github.com/WordPress/WordPress/blob/master/index.php)
 *  Thread Starter [gabigatzki](https://wordpress.org/support/users/gabigatzki/)
 * (@gabigatzki)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292788)
 * I have changed the index file back to the original one, and opened a test directory
   and placed my index.php and header.php in it, and now im trying to run [http://localhost/wordpress/test/](http://localhost/wordpress/test/)
   and still get the same error message.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292789)
 * What if you put your test folder in the “themes” directory? Then activate that
   theme in the dashboard
 *  Thread Starter [gabigatzki](https://wordpress.org/support/users/gabigatzki/)
 * (@gabigatzki)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292793)
 * I did that and now once I have loaded it as my theme and opened localhost/wordpress/
   it does seem to work, thanks alot 🙂
 * Shouldnt it also be working the way I treid before though? Do i have to load 
   a theme to check how it looks? cant i jsut run the files?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292796)
 * I googled your error message and a lot of the responses were “RESPECT THE DIRECTORY
   STRUCTURE”, so I would guess not.
 *  Thread Starter [gabigatzki](https://wordpress.org/support/users/gabigatzki/)
 * (@gabigatzki)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292798)
 * Ok, ill stick to that way, thank.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘WordPress problem over XAMPP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [gabigatzki](https://wordpress.org/support/users/gabigatzki/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/wordpress-problem-over-xampp/#post-5292798)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
