6
This content is rated TV-MA, and is for viewers 18 years or older. Are you of age?
Sorry, you are not old enough to view this content.

How To Video: Migrate your Web site

About Video Transcript

How To Video: Migrate your Web site

4:27 /

Tips for moving your Web site and domain name from one Web host to another.

A lot of people run their Web sites by paying a Web host for server space. The Web host handles the maintenance of the servers, the actual machines, while you handle the operation of your Web site. You want to pick the right host because moving a Web site is a hassle. Even so, sometimes Web hosts change their terms, lose their quality of service, or even go out of business. Here are some pointers for moving your Web site to a new Web host. We're going to assume you already run a Web site and are familiar with how domain name registrars and Web hosts work in general. For this example, we'll migrate a WordPress blog so that we can show how to move files and databases. Start at your old Web host. Fire up your favorite FTP program; I use FileZilla. It's free and has a lot of the functions that I like. Connect to your old host and navigate to the folder of the Web site that you're moving. Highlight that folder and download it. It should have all your pages, images, all your WordPress files, everything. Downloading the entire folder preserves the directory structure intact. If you already keep a copy of that site locally, don't overwrite the local copy. Instead, copy the current site into a new folder. That way if you discover any issues, you haven't touched your backup. Next, log in to your database management interface, likely MyPHP. Select export. If you have multiple sites in the database, select just the tables from the site you're moving. Choose to compress as a ZIP file. And press Go. Finally, check to see if there are any other site elements in odd places. Sometimes CGI scripts are kept in a directory outside the main site folder. Copy any other data you can think of. Now go to the new Web host. Create a domain record for the new version of the site, but do not redirect the domain name yet. We want to get the new site up and running first. Reverse the process and upload the folder you just downloaded from the old host. Now go to the database interface at the new host. Select import, browse to the zipped file you exported from the old site, and press Go. Finally, restore any of those oddball files. CGI scripts may work a different way with the new host, so read the documentation and put the scripts where they need to go, plus update any paths that change. For instance in WordPress you'll need to update wp-config to point to your new database. Now test the site BEFORE you change the domain name to point to it. Your new Web host should provide a way to browse to your site even without the domain. Some things may be broken if you had absolute paths coded, but you should get the idea if everything is there. Try out all the important functions. Finally, you'll need to redirect the domain. Before you do though, make a slight, insignificant change to one of the pages on the new Web host. That way you'll know when the domain has changed. Go to your domain registrars site. I recommend registering your domain at a different company than your Web host. It just keeps things cleaner. You can transfer domains to a new registrar if you need to. But we won't cover that here. Most registrars have a way to edit the nameservers yourself. These are the servers at your Web host that resolve the domain name to the directory where you have your site. Get the new nameservers from your new host and edit the domain record accordingly. Now wait. Sometimes I've done this and the domain switches over almost immediately, and sometimes it takes a day. This is why you made that subtle change earlier. Once you see the change, you know the domain is now pointed at the new site. Now do your full testing. Including logging into WordPress to make sure the new database works right. And that's it. I recommend keeping the files at the old host for a couple weeks, just until you're sure everything is running properly. But once you're comfortable and the old host's files are out of date anyway, you can go ahead and close that account. And enjoy your new host! I'm Tom Merritt, CNET.com.

New releases

Sony Xperia E4G does big battery on a budget
0:56 March 4, 2015
Sony says its new smartphone will last an impressive two days before it needs charging. We go hands-on at Mobile World Congress.
Play video
The Lexus LF-SA concept ventures into the ultra-compact territory
1:13 March 4, 2015
At the 2015 Geneva Auto Show, Lexus goes decidedly small with their ultra-compact Lexus LF-SA concept and rethinks the way the driver...
Play video
What to expect at Apple's 'Spring Forward' event
5:44 March 4, 2015
The Apple Watch is a no-brainer, but expect to see MacBooks at the presentation as well. Will the Apple TV, iPad Pro or Beats Music...
Play video
Bugatti Veyron Vitessa La Finale marks the end of the road
1:27 March 4, 2015
After nearly 10 years of production the Bugatti Veyron is through. This very special model is #450, La Finale.
Play video
Bentley EXP 10 Speed 6 brings new curves to a classic brand
1:52 March 4, 2015
Join us in Geneva to take a look at the latest concept from Bentley, a luscious two-seater coupe that just might see production.
Play video
Samsung's Z1 phone runs Tizen, not Android, to achieve low price
1:58 March 4, 2015
Come take a look at the Samsung Z1, a 4-inch phone that runs Tizen software, not Android in order to make it affordable for developing...
Play video
Porsche 911 GT3 RS: The number of the beast
4:51 March 4, 2015
More power, less weight, harder dynamics. The 911's angry sibling has arrived and it's out for victory. XCAR checks out the new GT3...
Play video
Comparison shopping for baby gear
0:59 March 4, 2015
Whether you're an expectant parent, new parent or just trying to purchase a baby gift for a friend, wading through the thousands of...
Play video