First off, I want to apologize for not blogging more recently. A combination of a major work-related presentations and a desire to carve out time to work on other, soon-to-be-announced projects made blogging time pretty difficult to find.
Secondly, I want to wish all my friends and readers a very wonderful holiday season and the best wishes for a very happy new year!
Lastly, I wanted to make a note that I just changed hosts, moving everything over from my previous host Bluehost to my new host WebFaction (which gives me much greater flexibility and control over my servers). Sadly, despite working many hours on the transfer, moving servers is one of those things where, provided you did everything right, nobody should notice anything different – the ultimate thankless task. So I’m writing this in part so you now know :-).
In the spirit of the post I made some three years ago when I first moved my blog from Blogger to its own domain, I thought I’d share my experiences with the transfer in the event that this is helpful to someone else who is thinking about moving their existing WordPress setup to a Webfaction server (much of this is adapted from the WebFaction doc: http://docs.webfaction.com/user-guide/inbound.html#inbound-moving-a-wordpress-site).
- Point your domain registrar to WebFaction’s name servers. If your domains were registered with Bluehost, this is something I believe you can access from BlueHost’s Domain Manager tab. I had previously transferred all my domains to a registrar called NameCheap where the access point for this is under “Manage Domains” (which you can see when you mouseover the “Domains” button in the toolbar). After selecting the domain, you wish to modify, click on “Domain Name Server Setup” and after selecting the “Specify Custom DNS Servers” radio button, you can enter WebFaction’s name servers in the text boxes.
- Use WebFaction’s control panel to register the domain. Click on “Domains/Websites” on the left-hand side and then click the “Add Domains” button on the top of the resulting page.
- Use WebFaction’s control panel to build a new “Static/CGI/PHP Application”. Go to “Applications” under the “Domains/Websites” header on the left-hand-side and click on the “Add new application” button. Enter a name and make sure to select “Static” in the first dropdown menu.
- Use WebFactions’ control panel to build a new “website” which maps the application you just created with the domain you just registered. Go to “Websites” under the “Domains/Websites” header on the left-hand-side and click on the “Add new website” button. Enter a name, type out the domain you wish to use in the text field labeled “Domains”, and when you hit “Add a web app”, click on “Reuse an existing web app” and select the application you just created.
- Export the database from BlueHost. The easiest way to do this is to go into BlueHost and use the PHPMyAdmin tool to log into the administrative interface for the database which corresponds to your WordPress installation and use the export functionality to get a SQL “dump file”. Download that file and then upload it to your WebFaction server/use FTP to pull it off of your BlueHost server.
- Create a New MySQL Database in WebFaction. Click on “Databases” on the left-hand-side of the WebFaction control panel and click on “Create New Database.” Enter a name, hit the “Create” button, and take note of the password that was autogenerated and the user name (the name of the database before the mandatory “_” character).
- Import the database dump file into the database you created in Step 6. Use an SSH tool to get shell command access to your WebFaction server. From the resulting command line, run the command “mysql -u db_name -p -D db_name < dump_file” where the italicized db_name should be replaced by the name of the database you just created and the italicized dump_file should be the name of the dump file that you’ve uploaded/transferred to your WebFaction server. The command will ask you for the password to your database (which you of course wrote down from the previous step, but, if not, can easily rectify by clicking on the “Change database password” link under the “Databases” heading on the left-hand side of the WebFaction control panel) and will complete the import.
- Copy the BlueHost directory containing your WordPress install into the WebFaction directory corresponding to the application you created in Step 3. You can do this by manually downloading the files from BlueHost to your computer and then re-uploading (long, slow, annoying) or you can use wget or FTP to mediate the transfer directly between WebFaction and BlueHost (my recommended choice). Make sure you copy the .htaccess file or your URLs will break and you will need to recreate one from the WordPress admin panel after you’ve completed the transfer
- Edit the wp-config.php file in the root directory to properly tell WordPress:
- What the database name is: edit the line that looks like “define(‘DB_NAME’, ‘<database_name>’);” and replace “<database_name>” with the name of the database you created in step 6 (keeping the single quotes)
- What the right user name is: edit the line that looks like “define(‘DB_USER’, ‘<user>’);” and replace “<user>” with the name of the user in step 6(keeping the single quotes)
- What the database password is: edit the line that looks like “define(‘DB_PASSWORD’, ‘<password>’);” and replace “<password>” with the password from step 6 (keeping the single quotes)
- Where the database is: edit the line that looks like “define(‘DB_HOST’, ‘<host>’);” and replace “<host>” with “localhost” (keeping the single quotes)
- Test the sucker! Note: you may need to wait up to 48 hours for the domain name shenanigans to be properly reflected by DNS servers