Your Guide to Website Design and Management

Text Size:
small_A.gif small_A.gif
Bookmark and Share

Rating: 5.0/5 (1 vote)

Configuring and Administering Your Server >>

Setting Up / Moving Servers - A New Server Checklist

It probably seems logical that you should avoid moving servers if you can. Unfortunately, sometimes you just can't avoid it. In that case there are some things you can do to make your experience more trouble-free.

The Easy Way to Migrate Servers

If you use cpanel or Plesk, each offers a migration tool. Use that tool on the new server to automatically transfer your entire domain from the old server. It *should* pull all relevant data, email accounts, cron jobs, databases, etc. After successful completion, merely check that the new site is working properly (under the site preview option or the direct IP address if you are running a dedicated IP). Once everything looks good, go to your domain registrar and make the nameserver changes to specify your new server's nameservers.

One note: double-check the DNS table entries after migration. I have noticed on some of my migrations that the NS1 retained the original server IP.

Another note: I also noticed that, at least with Plesk, some junk files get added to the migrated domains, namely css, img, picture_library, plesk-stat, and test folders. They won't do any harm, but I prefer to delete them.

Final note: The migration tool has its own set of rules. One of the Plesk rules is that you can only transfer a domain with a dedicated IP to another dedicated IP and a shared IP to a shared IP. You might try creating a test domain on the old server and trying to move it over as a test to make sure the migration tool is working properly and you understand it's process completely.

The Hard Way – Manually Moving Severs

Things to Do Before DNS Switch
Action

Status

Read Moving to a new web host by Google's Matt Cutts for a recommended way to move to a new webhost or IP address without having problems in Google  
Verify IP address not blacklisted; attempt to whitelist if appropriate (http://www.mxtoolbox.com/blacklists.aspx). It's best to do this first as you may be able to request a clean set of IP addresses from your new host before starting the migration work.  
Backup entire relevant directory and sub-directories (e.g., httpdocs on a Plesk setup) and import to new server. To do a compressed archive use the following:

tar -zcvf archive.tar.gz *
To restore the archive on the new server use:

tar -zxvf archive.tar.gz
I believe this should maintain the existing file permissions and ownership rules, but you should verify this is the case.

In the event you are using a secure connection (https) for your site, remember to backup the httpsdocs directory as well.
 
If you have any server-side scripts outside of your main directory, remember to backup and transfer those as well (e.g., automysqlbackup)  
Email Accounts setup (individual accts, catch all, bounce, postmaster, aliases)  
Customized 404 page(s) if appropriate  
php.ini file modifications if necessary (timeout, default index, magic_quotes, etc.); if moving servers, download copy of old server php.ini file as reference  
Web analytics setup (may need to move log files from old server if moving servers)  
FTP / Secure Shell accounts  
Password protect relevant directories  
Apache settings (no viewing directories, etc.); if moving servers, download copy of old server http.conf file as reference  
cron jobs (note that some hosting companies provide special versions of WGET, etc. so if your old server does make sure to convert the cron commands to whatever is appropriate on the new server)  
SSL certificate(s)  
Setup and copy database(s). If possible, try to maintain the same username/passwords. If not possible, change any scripts that access the DBs. Also, though not common, if external websites are authorized to access a database, be sure to add relevant permissions when setting up the database on the new server.

To move your database content, first dump it on the old server using the following command line command:

mysqldump –u username –p password database > database.sql
Then use FTP, scp or whatever method you prefer to physically transfer the dumped database file to your new server.

Finally, import the dumped database file data into your newly created database on the new server using:

mysql –u username –p password database < /path/to/database.sql
 
Make sure any relevant third party scripts are installed on the new server (e.g. phpMyAdmin, openx, AWStats)  
Optimize MySQL both in server side configuration and in your scripts' SQL statements (especially use of indexes)  
If you have SpamAssassin or other control panel features enabled be sure to note the current settings and setup on new server control panel accordingly  
If you use any scripts that require special server configuration (e.g., ioncube), verify the new server is configured for it properly and that you test the script/application before going live.  
Plan for the possibility of an outage in advance by creating a error page (in html in case there is a problem with the scripting engine) that fits the look and feel of your site, and containing a message about how you are improving the site and apologize for the temporary inconvenience. Add the following lines to your htaccess file:

#ErrorDocument 503 /absolute/path/to/errormsg.html #RedirectMatch 503 .*
If you have downtime, simply delete the "#" at the beginning of each line. Once the issue is corrected, reapply the # and your site will resume normal operation.
 
A week before you do the move set your DNS refresh times to around an hour. Then down to 15 minutes, 24 hours before the move. Change the times back a few days after the move.  
Make the actual DNS change with your domain registrar.  

Things to Do After DNS Switch
Action

Status

Test code for CSS, HTML integrity via W3C  
Verify all of your cron jobs are working correctly  
If you use SSL certificate(s), verify they are working properly on the new server  
Use Google Webmaster Tools to verify no problems with the new server  
Run a complete DNS report (http://intodns.com/, http://www.iptools.com/, http://www.pweb.cz/en/dns-test/ http://www.checkdns.net/quickcheckdomainf.aspx) and a reverse DNS check (http://postmaster-us.aol.com/tools/rdns.html)  
Run SPF / SenderID test (http://www.openspf.org/Tools, http://www.vamsoft.com/spfcheck.asp, http://senderid.returnpath.net/how.php; or simply send an email from the domain with SPF to test to check-auth@verifier.port25.com. An Authentication Report will be sent back to the email account inbox after a few minutes with complete details and results of summary, SPF check, DomainKeys check, DKIM check, and Sender-ID check.  
Verify any ad code (e.g., Google AdSense, TextLinkAds, etc.) is working on the new server  
Verify any third party monitoring scripts (e.g., Google Analytics) is working on the new server.  
Leave your existing server active for approximately 72 hours. At the end of that period, set the old server to respond to requests with a "Bad Request" message. This should force search engines to update their cache immediately, and guarantee that the engines get the correct new information.  
Delete the site from the old sever and test again. It's not likely but possible that broken code and improperly migrated databases worked because they were on the old site too. Sometimes linking will be by IP also, and you won't catch that until you delete the site from the old server.  


"For people who make websites" - A List Apart Magazine explores the design, development, and meaning of web content, with a special focus on web standards and best practices.
HTML Validator is a Mozilla extension that adds HTML validation inside Firefox and Mozilla. The number of errors of a HTML page is seen in the form of an icon in the status bar when browsing. The details of the errors are seen when looking the HTML source of the page.

The extension is based on Tidy and OpenSP. Both algorithms were originally developed by the Web Consortium W3C. Both algorithms are embedded inside Mozilla/Firefox and makes the validation locally on your machine, without sending HTML to a third party server.
This project aims to create an archive of user contributed clip art that can be freely used.
Starting at the beginning, this reference explains everything you need to know about using core JavaScript. It assumes you have the following basic background: a general understanding of the Internet and the World Wide Web and a good working knowledge of HTML. An excellent resource.
Edit your images on the fly online with Splashup, a web-based image editor that integrates with Flickr, Facebook, and Picasa. Splashup offers up a surprising array of image editing tools, far beyond the usual crop of resize and contrast-- you can also edit multiple images, play with filters and layers, use a variety of brushes, and more. Splashup is one of the best image editors in a long line of image editors; i.e., Picnik, Pixoh, and Resizr, to name just a few.[Lifehacker Annotation]
This website will let you:
  • Create an XML sitemap format that can be submitted to Google to help them crawl your website better.
  • Create a Text sitemap to submit to Yahoo.
  • Create a ROR sitemap, which is an independant XML format for any search engine.
  • Generate an HTML site map to allow human visitors to easily navigate on your site.
Clearspring's free Launchpad widget builder lets you easily turn your website's content into a widget which site visitors can use to place your content on all the major social media sites (MySpace, FaceBook, Google, hi5, Live, Yahoo, Wordpress, Blogger, etc.). The service also provides tracking and analysis.
This site features online text and html changing, modifying, converting tools designed to save you time making web pages or preparing text for web publication. If you've ever needed to capitalize sentences or convert line breaks to <p> or <br /> then this site can save you needless manual labor. There are other useful tools as well, like the one to uncompress html to make it readable and the ones to uppercase or lowercase text. Basically, the most common tasks that someone who works in an office or does freelance web development might encounter. Most of the tools have been created using javascript so you should be able to change large amounts of text as the processing is done on your computer instead of being limited by a server script.
You've downloaded and configured your Apache server and are ready to move on to the next project. Can it really be left to fend for itself in a darkened room?

Yes. To some degree, anyway. On the other hand, completely ignoring your Apache installation would be foolhardy.
The Wikipedia entry for Sender Policy Framework (SPF).
The Wikipedia entry for DomainKeys.

Text Size:
small_A.gif small_A.gif
Bookmark and Share