[resolved] Moving WordPress to root failed (13 posts)

  1. webbmalin
    Posted 2 years ago #

    I did what I always do when moving WordPress, guided by this article: http://codex.wordpress.org/Moving_WordPress

    I had my site in mydomain.com/wp/
    I changed it to mydomain.com in both "WordPress address (URI)" and "Site address (URL)" in Settings/General

    And then I moved the files to mydomain.com/ using the ftp.

    And everything turned white, with no error message or anything.
    I also changed the permissions back to 0644 where they changed.

    Not working.
    So I moved everything back to mydomain.com/wp/ but now I can't log in.

    Anybody have suggestions what i can do now???


  2. A white screen is usually a plugin problem. Move everything back to root and rename the plugin folder to old_plugins to force deactivate them all. Reactivate them one at a time.

  3. freewpsetup
    Posted 2 years ago #

    While moving wp sites always delete .htaacess file.

    To get your site back, you will need to login to your phpMyAdmin on your web hosting cpanel. After login select the database and go to the wp_options table and click the browse tab.

    Check the siteurl field and home field is set to the URL with the sub directory/directory. Changing them to the correct values may help you to retrieve the site.

    Always do a whole site/database backup before...

  4. Marvel Labs
    Posted 2 years ago #

    1. Go to your Cpanel
    2. Login database using phpmyadmin
    3. Export the database as SQL
    4. Open it with text editor (notepad++)
    5. Replace http://www.yourdomain.com/subdomain with http://www.yourdomain.com. Save
    6. Login to phpmyadmin and import the modified SQL file
    7. Say thanks

  5. @Marvel Labs: You're wrong.

    1) There is no need to export the DB to move to root; URL changes can be done in wp-config, or in the wp_options table with phpmyadmin; and 2) and your find/replace method using a text editor in a DB dump will break serialized data.

  6. Marvel Labs
    Posted 2 years ago #

    @ songdogtech

    I actually moved several WordPress installations successfully using the same technique. But, there is no harm in trying as the siteurl including all media uploads will now point to root instead of sub domain...

    Please try is yourself as I am quite confident about integrity of data being maintained...

  7. Your find/replace method using a text editor in a DB dump will always break serialized data, such as options and widget data.

  8. fonglh
    Posted 2 years ago #

    Except when the URLs have the same length.

  9. @fongli said:

    Except when the URLs have the same length.

    That doesn't really mean anything. The typcial user isn't going to know that. If you need to change URLs in the database, run queries in phpmyadmin.

  10. fonglh
    Posted 2 years ago #

    Isn't the serialized data from a PHP function? What queries in phpmyadmin would help maintain the integrity of the serialized data?

  11. webbmalin
    Posted 2 years ago #

    Thank you guys!!!!!

    I moved everything too the root-folder again and was going to try things step by step and started with deleting .htaccess and then it worked :)

    I never had to do that before...

    One thing though, I usually have to change all the permissions on files from 777 to 644 manually using my http://ftp... Is there a way to change all files at the same time?

  12. The change to 777 shouldn't be happening; sounds like a host glitch. See Filezilla and FTP Clients « WordPress Codex and Changing File Permissions « WordPress Codex to get the right scheme; Filezilla will let you recursively change whole folders, but be careful what you do. Files need to be no more than 644, folders 755.

  13. webbmalin
    Posted 2 years ago #

    Yes, it's the host, I know... but they don't seem to care so I have to fix it everytime :)

    I'll check those out. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic