WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] replace an existing html/php website with wordpress (9 posts)

  1. allanit
    Member
    Posted 2 years ago #

    Hi guys

    I have successfully installed several WordPress blogs. Now I need to replace an existing html/php website and want to use WordPress which in its self is not a problem. But the problem I am having is I need to keep the existing site up and running until the new WordPress site is redy to go live. Also I would like to wind up with the WordPress/new site in the document root, if that is possible.

    I have red the codex which said to put the new WordPress installation in a folder and then move the index.php and the .htaccess to the root folder and make some changes to the General Settings page in the admin area after completing the setup phase.

    In several unrelated tutorials they say that after completing the setup phase you can copy the entire WordPress installation from the folder and pate it in the root folder, which is what I would prefer to do if that is possible.

    So my questions are

    If I move the entire WordPress installation from the folder and pate it in the root folder after removing the existing html/php website will that brake the WordPress instalation?

    And

    Is there any other setting that need to be set like to the General Settings page in the admin area for this to work?

    AllanIT

  2. fonglh
    Member
    Posted 2 years ago #

  3. govpatel
    Member
    Posted 2 years ago #

    I have red the codex which said to put the new WordPress installation in a folder and then move the index.php and the .htaccess to the root folder and make some changes to the General Settings page in the admin area after completing the setup phase.

    You are not suppose move index.php you are suppose copy the file in root if you want to use wordpress from directory.

    If I move the entire WordPress installation from the folder and pate it in the root folder after removing the existing html/php website will that brake the WordPress instalation?

    You need to change the urls in Settings>>>> General and then move content of the folder to root. Once you can log in reset permalinks if used.

  4. allanit
    Member
    Posted 2 years ago #

    HI Guys

    Thanks for your responses however they seem to contradict each other and I am even more confused than before.

    @govpatel
    So please correct me if I am wrong. What I would do is

    1. Create a folder in my root directory called lets say ‘wp’
    a. Upload WordPress and all files and folders to the ‘wp’ folder.
    b. Configure WordPress to look the way the site should eg theme it, add pages, plugins, images, etc... until I am happy with the look.
    2. Then remove the old html/php site from the server just leaving the ‘wp’ folder.
    3. Then copy the index.php and the .htaccess files to the root folder.

    Then what? is that all?

    Are there two methods of achieving the change over? In one you leave every thing in a folder and just copy the index.php and the .htaccess files to the root folder and in the other you move all files and folders to the root folder?

    If yes whish is easer?
    And what else has to be corrected?

    AllanIT

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Then what? is that all?

    See Giving_WordPress_Its_Own_Directory

    If yes whish is easer?

    The one that govpatel suggested.

  6. govpatel
    Member
    Posted 2 years ago #

    Open your root directory's index.php file in a text editor
    Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wp/wp-blog-header.php');

    reset your permalinks if used

  7. allanit
    Member
    Posted 2 years ago #

    Hi Guys

    Thanks for the extra information. Now that makes more sense. especially the link to 'Using a pre-existing subdirectory install' which fill in most of the gaps.

    I still have one question and that is how to reset the permalinks. I take it that to reset the permalinks you go to the permalinks page and click save but do you have to change anything or will clicking save reset the permalinks?

    again thanks for your help
    AllanIT

  8. govpatel
    Member
    Posted 2 years ago #

    When you log in and go settings>>>Permalinks and save .htaccess will be rewritten with the change you made.

  9. allanit
    Member
    Posted 2 years ago #

    thanks I will try this

Topic Closed

This topic has been closed to new replies.

About this Topic