It can be a daunting task to move a Wordpress website from one host to another. I have set forth the steps I have followed and If you are careful and follow these steps, I guarantee you will not have fun. I cannot guarantee success but it worked for me.

  1. Create a new wordpress install on the new host.
  2. Make sure you have all the plugins, and themes at the new host. I have 2 computers at my desk and ftp to the old host from one, and the other from computer #2 to make it easy to compare the directories.
  3. In my case, I use php files to cloak affiliate links, so if you have anything like that, or if you have any pictures or videos stored on your server make sure you have all that moved.
  4. go to phpMyAdmin on the old site select the database of the wp installation you are moving. If you are not sure which database it is, or just to make sure, pick the database you think it is, select the table wp_options in the left window, then select Browse in the right(main) window.  The top 2 rows should be siteurl and blogname. Confirm that you have the right one.
  5. Click on the database name link near the top of the left window.
  6. Click on Export near the top of the right window.
  7. Near the top of the window it should now say “View dump (schema) of database”.
  8. Going down the left side, click on Select All, make sure SQL is selected, Add a checkmark to Save as file,  
  9. Moving toward the right you will see “Export Type“, Select Insert…. ready, set, Click GO
  10. Save the file to your desktop, it should have a name like “somename.sql”.
  11. go to phpMyAdmin on the new site select the database that was set up in #1 above and repeat steps 2-8 except do not Click on save as file.
  12. it will print the database to the screen, near the top will be a line that says
  13. – Database:  `somename_morename`              
  14. Highlight (select) that line and copy ( <ctrl>+c for windoze users)
  15. Open the file you just saved (from the old site) in a text editor and find a similar line. Make sure you use text editor, not something like word. 
  16. Highlight (select) that line and paste ( <ctrl>+v for windoze users)
  17. there are likely some references to absolute paths in the database, things will be broken if these are not fixed.
  18. search in the file for the string public_html
  19. you should find something like the next line:
  20. “/home/mywebhostloginname/public_html/sitename.com/wp-content
  21. with important stuff preceeding and subsequent to that. What is likely different on the new site is the stuff between the quote “/home and /wp-   you may be able to tell what the differences are by looking at the address bar in your ftp program. If not you could get the information using a plugin called WP-ServerInfo. Do a search and replace to make the corrections. The relocation I did today had 4 occurences.
  22. Save the file.
  23. Back to phpMyAdmin on the new site 
  24.    Make sure you have the right database selected
  25. In the right window select structure at the top
  26.    Make sure you have the right database selected
  27. Click on Check all near the bottom
  28.    Make sure you have the right database selected
  29. There’s a  selection box that starts out saying “With selected” make the selection that says “drop”:
  30.    Make sure you have the right database selected
  31. When it says do you really want to yes  | no click yes
  32. At the top of the right window select Import
  33. Down from that it will give you the choice to browse for the file you just saved find the file and… ready, set, Click GO
  34. Now we are at the point where (when I once did repairs on radios we thought we might be finished so we would plug the radio in) it’s time for the smoke test.

If you did like I did, moving to HostGator from another company, HostGator is set up to recognize a subdomain that will allow you to test the installation at domain-Im-Moving.my-main-domain.com. while your registrar is still pointing to your old domain. You could switch it before you test it, but I would rather test it first.

I have a domain that I use for testing that I can use for an example at http://iquitsmokig.net Well if the registrar was still pointing to an old host, I can access it by accessing it as a subdomain of what hostGator has set up as the primary domain for my account. which is tunded.com (don’t ask :-) So if I go to http://iquitsmokig.tunded.com I can test to see if it works.

  • Share/Bookmark