WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Lost my website when moving to root directory (19 posts)

  1. smiffy2005
    Member
    Posted 1 year ago #

    Hi Everyone, I really hope someone can help me. I've spent the best part of a week making my site, getting it exactly right and I seem to have broken it when trying to transfer to the new root directory via FTP. I've been up all night trying various fixes, none of which seem to work. A little knowledge is a dangerous thing I guess.

    I built the site under http://www.wsbf.co.uk/Test and it worked perfectly. I followed a youtube tutorial to move the site to http://www.wsbf.co.uk and thats where it went wrong.

    I've gone into PHPmyadmin and changed the url back to http://www.wsbf.co.uk/Test but I still can't even get into wp-admin. If I go to the site address is just displays a white page.

    I wasn't 100% using FTP and tried moving the files from public_html/Test to /public html. When this broke things I tried remembering what file I moved and tried moving them back into /Test but still it doesn't work.

    In PHPmyadmin I have the website table on the left as well as the new table for the root directory installation. Should I have made this or should I just delete it?

    Can someone help me get some sleep, because I really don't want to have to start this from scratch again.

    Before anyone feels the need to comment on how naive I have been, don't worry I know. But we all make mistakes right? Otherwise we'd never learn.....

  2. pdobariya
    Member
    Posted 1 year ago #

    you need to change home url and site url both from PHPmyadmin

  3. smiffy2005
    Member
    Posted 1 year ago #

    Hi,

    I've changed the site url, but can't see where to change the home URL. I presumed I could go get into the site url/wp-admin and change it in preferences but I can't even get into that.

  4. Krishna
    Volunteer Moderator
    Posted 1 year ago #

  5. smiffy2005
    Member
    Posted 1 year ago #

    Hi Krishna,

    Thanks. I tried that, followed the steps exacyly but to no avail. It still just gives me a white page. I think I have messed something up when I moved the files around via FTP.

    Is there a way I can copy the content of the website and re-install wordpress and install that file to restore the site?

  6. Krishna
    Volunteer Moderator
    Posted 1 year ago #

  7. smiffy2005
    Member
    Posted 1 year ago #

    I enter my details and then it takes me to a 404 Page not found page.

  8. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    In your wp-config.php file, add these two lines and see if it helps:

    define('WP_HOME','http://www.wsbf.co.uk/Test');
    define('WP_SITEURL','http://www.wsbf.co.uk/Test');
  9. smiffy2005
    Member
    Posted 1 year ago #

    Krishna,

    before I do that, I just noticed that my wp-config.php file is above the Test directory and when I open that it shows the SQL Database as the new database I created to move the site over to rather than the original one. I cannot see any other wp-config.php file in my /Test directory.

    Should I still do what you say above?

  10. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    Your WordPress installation is in the sub-directory (Test). So, the wp-config.php file also in that directory. Do you find a file named wp-config-sample.php there? Copy it to a text editor (like notepad), fill in the details of your new database (created for Test, not the old one), name the directory as wp-config.php and upload it there.

  11. smiffy2005
    Member
    Posted 1 year ago #

    Krishna,

    I did that and it now gives me the error "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wsbf9472/public_html/Test/wp-config.php on line 28"

    I'm getting a bad feeling about this :-(

  12. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    Can you post your wp-config.php files line 28 here?

  13. smiffy2005
    Member
    Posted 1 year ago #

    I guess thats counting down from the top?

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    I've gone into SQL database to check my password and it doesn't seem to match. Do you know how I can check what my sql password is? I'm with Hostpapa

  14. smiffy2005
    Member
    Posted 1 year ago #

    Krishna,

    Thanks for your help. I've managed to solve it. I had to reset my user in MySQL and then reattach with a new password. Amended the wp-config.txt with the new password and it worked.....

    PHEW...

    Can you give me some guidance as to how to transfer to http://www.wsbf.co.uk please without going through this again!!!!

    I'm scared to try anything!!!!!

  15. smiffy2005
    Member
    Posted 1 year ago #

    Or maybe I spoke too soon. The home page loads but none of the other pages do. *sigh*

  16. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    All of your pages are loading fine. Clear caches and cookies, use a different browser or machine and try again.

  17. smiffy2005
    Member
    Posted 1 year ago #

    Thanks for your patience and help Krishna. I may get some sleep now!!!

    So, if I want to move to the root directory, do I just copy /Test files to Public_html and change url's in general settings?

    I need to do this but don't want to go through this again....

  18. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    You can follow the step-by-step instructions here:
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

    Read the instructions carefully. If you follow the steps correctly, you can have your URLs changed the way you want them.

    Backup your site first so that you can restore to what you have now if any thing goes wrong.

  19. smiffy2005
    Member
    Posted 1 year ago #

    Thank you Krishna

Topic Closed

This topic has been closed to new replies.

About this Topic