6 replies
  • WEB DESIGN
  • |
I am getting this error code and cannot figure out working on getting my first site going. Probably something simple..

Thanks

Fatal error: Call to undefined function get_header() in /home/XXXXX/public_html/mynewsite-review.com/index.php on line 1
#code #error
  • Profile picture of the author Ken Shorey
    Check to make sure you only have one index.php file in the root folder of your site. You may have had a previous index file there or maybe you uploaded your theme to the root folder rather than to /wp-content/themes/ where it belongs.
    {{ DiscussionBoard.errors[3334961].message }}
    • Profile picture of the author flyguy017
      Thanks Ken, I had uploaded the themes file to both the wp-content/themes, and loaded it to the domain that I am setting up as the site. That is what i am confused about is does the theme and files have to be in my add on domain folder and the root also???
      {{ DiscussionBoard.errors[3335179].message }}
  • Profile picture of the author carrot
    It just goes in the wp-content/themes/ folder on the domain you want it to appear on, so in this example the addon domain folder.
    EG
    public_html/mynewsite-review.com/wp-content/themes/themename/
    Do NOT put the theme files in
    public_html/mynewsite-review.com/

    If you have already uploaded to the addon domain root folder (public_html/mynewsite-review.com/) then you probably overwrote your wordpress index.php file.
    Good news is its a simple file. Add this to a text file:

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

    And save it as index.php and upload it to public_html/mynewsite-review.com/
    That should fix your problems.
    {{ DiscussionBoard.errors[3335248].message }}
    • Profile picture of the author flyguy017
      Thanks so much for the help,

      I guess my next question is then do all of the WP files have to be copied each time that you create an new add on domain name??
      {{ DiscussionBoard.errors[3335568].message }}
      • Profile picture of the author BradleyEynon
        Hey there flyguy017.

        Yes if you add a domain to your hosting account you will need to add the WP files to that domain also.

        There are more complicated ways around it but for simplicity I would copy the files to the new domain.

        Any problems, feel free to give me a shout.

        cheers
        Signature
        The Six Figure Mentors... make money the new way!

        Are You Making The 7 BIGGEST Google Sniper 2.0 Mistakes?

        {{ DiscussionBoard.errors[3335602].message }}
  • Profile picture of the author carrot
    You need to install wordpress in the addon domain folder (unless you are using multi-user). It will need its own database etc.
    {{ DiscussionBoard.errors[3335772].message }}

Trending Topics