• Resolved vovin

    (@vovin)


    I’m using hostgator and they have a wizard that installs wordpress for you. After the setup it gives me a default wordpress blog on the root folder.

    The problem is, I already have my site I want to put on the root folder. Now I have a whole bunch of files in the public_html folder and I don’t know what has to be deleted and what has to stay, before I upload my site.

    Is there a guide that answers this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • stvwlf

    (@stvwlf)

    Hi

    If the site you want to load is WP version 2.7.1, just load it on top of what Fantastico installed. It will be the identical files, so you really don’t need to delete anything.

    The one file you want to NOT overwrite is wp-config.php because that contains the connection to the database that fantastico set up. If you are installing your existing tables in the database Fantastico set up (which is a good idea), then make sure you do not overwrite wp-config.php with the version you will be uploading from the site you want to install.

    If the version you are loading is older than 2.7.1 you will have to delete all the files Fantastico installed, and also the database tables. One way to do that is download 2.7.1 onto your computer, so you can see the files you need to delete from the server.

    Thread Starter vovin

    (@vovin)

    I tried and when I load my site I now get;

    Fatal error: Call to undefined function get_header() in /home/*****/public_html/index.php on line 1

    So I got rid of everything in public_html, downloaded wordpress again, changed the config file, uploaded everything to public_html along with my site, and I still get the same thing.

    stvwlf

    (@stvwlf)

    Hi

    It sounds like you wound up with index.php from a theme in the location that the main WP index.php is supposed to go.

    The code for the main WP index.php that goes in the root folder is

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

    As you can see, there is no call to get_header() on line 1. get_header() is a function used in a theme, not in the core WP file.

    Confirm whether what I am saying is so, and if it is, figure out how your theme file got into the root folder. Themes belong in /wp-content/themes/{themename}/

    Thread Starter vovin

    (@vovin)

    Oh you are right. I replaced it with the proper index.php but now I get “Error establishing a database connection”

    Here is my site files by the way, if it helps.

    http://img21.imageshack.us/img21/5179/sitelnf.jpg

    stvwlf

    (@stvwlf)

    That is a problem in your wp-config.php file

    if you are still using the database that fantastico created, make sure you are using the database connection info from the fantastico install in that file, not from your old installation.

    stvwlf

    (@stvwlf)

    That image that you sent is of the files in your theme folder, not the main WordPress folder – just confirming that you know this

    Thread Starter vovin

    (@vovin)

    I screwed up big time, so I just wiped everything in public_html and deleted the database so I could try again.

    I had a problem but I just fixed it, if you read this post earlier.

    Thread Starter vovin

    (@vovin)

    Okay, everything is re-installed.

    Here is where I went wrong before, I didn’t put my theme in the right folder.

    Does everything go in wp-content/themes/? even the images folder?

    Edit: trial and error tells me yes. I shouldn’t be so quick to post.

    Thanks very much for the help. All is solved.

    stvwlf

    (@stvwlf)

    Hi

    There is a folder in WP called /wp-content/themes/

    When you wish to add a new theme, you upload the new theme’s entire folder into the /wp-content/themes/ folder, all at once. Don’t take anything out of that theme’s folder – leave images, javascript, everything, exactly where it is within the new theme’s folder. Just upload the whole thing into /wp-content/themes/ The theme is coded to find all files and images it is looking for within its own folder structure.

    The system is designed to make it very simple to add new themes.

    Glad to hear its all working now!

    dudes. export and import function.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Replacing a template on wordpress’ is closed to new replies.