• I have a godaddy hosting in which installed wordpress application. I then proceeded to install a premium theme i bought from themeforrest, i tried installing the theme from the online wordpress application but iwas giving me an error, which i dont remember, the i transferred the file on the theme from an FTP client to the root folder of godaddy.
    I got the following error : “Fatal error: Call to undefined function get_header() in /home/content/78/10035278/html/index.php on line 14″
    Please let me know what i did wrong and how to fix this problem.

    P.S: i am new to this

Viewing 14 replies - 1 through 14 (of 14 total)
  • Did you install wordpress onto your godaddy account? If not, install it and then login to wordpress through godaddy and go a fresh install of your theme through the ‘theme’ options.

    i transferred the file on the theme from an FTP client to the root folder of godaddy

    That’s not how you install themes.
    You overwrote the WordPress index.php by doing that.

    Please save the below as index.php and upload to your godaddy hosting (to your document root)

    <?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');
    Thread Starter dtcont

    (@dtcont)

    @hoatbui Godaddy had an option to install wordpress, i installed it through that
    @rajesh yes i installed all the files

    See my note above.

    Thread Starter dtcont

    (@dtcont)

    can i edit the idex.php in the root directory?

    Yes you have to edit the index.php in the root directory (as it appears you’ve overwritten it with the index.php of your theme folder.)

    Thread Starter dtcont

    (@dtcont)

    i did what you said, edited the index.php with information you provided.
    there is no fatal error anymore but my old site(i deleted it all the files of it from godaddy hosting) appears. WP admin panel does show my theme.

    What did i do wrong?

    Ok that sounds great.

    It appears you’ve mistakenly overwritten index.php (in your doc root) with the index.php of your theme folder

    Glad you got it working!

    Thread Starter dtcont

    (@dtcont)

    i think you misunderstood me πŸ™‚
    i deleted the old website, which we didn’t use WordPress for, and installed wordpress and installed a theme.
    I have put all the files in the root directory but no theme is installed in wordpress
    I would appreciate if you can help me out

    URL of your website please?

    Thread Starter dtcont

    (@dtcont)

    dtcont.com

    Okay so there are NO more fatal errors etc. and the theme that is used is the wordpress default theme.

    Now, as I understand, you’re saying that the content is showing from the old website.

    You have to edit wp-config.php and make sure the database details etc. are of the correct setup that you want to link to.

    To install a new theme, always upload the entire theme folder inside your doc_root (public_html/wp-content/themes or www/wp-content/themes)

    Never edit WordPress core files!

    Thread Starter dtcont

    (@dtcont)

    hmm
    ok so now what

    Thread Starter dtcont

    (@dtcont)

    theme that is used is a theme we bought from http://www.themeforrest.com

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

The topic ‘Fatal Error’ is closed to new replies.