I have my WordPress site being hosted on a Windows provider and I am moving to another Windows provider. Any gotchas or instructions on how i can smoothly transition from one to another without losing any info?
Assuming you want to keep the same domain, it's really quite simple. Basically you copy the files using an FTP client by downloading from the old host and uploading to the new one, and then you copy the MySQL database by doing a database dump to a SQL script (this is your "export") and then running the script (and this is your "import".)
The rest are just details:
1.) Use FTP to download all the files from the web root and all its subdirectories of your old hosted web server.
2.) Upload all those same files to the web root of the new hosted web server in the exact same named directories.
3.) Do a full database dump (i.e. export) of your MySQL database as a SQL script.
4.) Create a new MySQL database at your new web host.
5.) Create a user for your MySQL database and set it to have all permissions. Be sure to record the name of the database, of the user and of the password.
6.) Import your MySQL database by running the MySQL script in context of your new database.
7.) Next edit your
7.) Finally, be sure to change your domain's DNS settings so it uses the name servers from your new web host. You;ll need to wait the timeout for the DNS cache to clear and the addresses to propagate (typically it only takes a few hours but it can take up to 48 before your new site is accessible.)
Thats about it. If you need more specifics be sure to give a lot more details about your new host including minimally the name and website of your new host and if possible what type of control panel they offer for you to administer your site (i.e. CPanel or something else?)
The main gotcha when changing servers are hard-coded urls and file paths WP. They appear:
I generally recommend to turn permalnks off before creating the db dump, to avoid the 3rd issue.
The 4th issue prevents you from logging in, and can be fixed from the wp config file, if your site changes URL, by adding two lines to wp-config.php:
define('WP_HOME', 'http://domain.com'); define('WP_SITEURL', 'http://domain.com');
Mind trailing slashes in both defines.
The first issue's symptom is that you'll get permission errors when uploading files. It is fixed by making the upload path empty, so that WP uses the default value.
The second issue is only fixed by mass editing the database. But again, it's only valid for very very old data.
The rest is like Mike said...
Follow this codex page: http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server
So to come back and answer my own question and hopefully help someone else, the permalinks are easily rewritten by changing the permalink scheme in Settings > Permalinks. Change it, then change it back and your .htaccess file will be fixed.
The 2nd problem, the warning message, was a plugin that wrote a static link when I installed it. I deactivated, then reactivated it and it did the trick.
edit: thanks Lisa, just saw you there!
I use BackupBuddy (http://pluginbuddy.com) for all my migrations. It's a premium plugin and it's not perfect but it's much better than anything else I've found.
@Nick - I had the same problem where the main page loaded but none of the links. I changed Permalinks from Custom to Default and then it worked. I changed back to my custom settings later, and all worked out.
protected by toscho♦ Jul 2 '12 at 21:41
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?