x
 
Create New Page
 View Previous Changes    ( Last updated by Lisa Wess )

Server Migration

It is quite common for EE installations to move to new or upgraded servers. Although the full method of doing so is beyond the scope of this entry, here are some hints which might provide a more painless transition:

NOTE: This entry assumes you are moving from one UNIX to another similar flavor (UNIX or LINUX) - all bets are off with windows servers….

1. Unless it is an “emergency” upgrade (broken server, etc), upgrade your installation with the most recent versions of EE one or two weeks before D-Day. Take a few days after the upgrade to make certain that all features work.

2. DNS for your server must be moved prior to moving the site. Your Admin or ISP will hopefully take care of this for you. A good way to do this is to move all DNS and point all name servers to the NEW ISP, but have him use the identical records as before - pointing to your OLD server. This means the old server is still in use during the week or so before transition. Ask your admin about the TTL (Time to Live) of the DNS entries, so you will know how soon changes will take effect after they are made.

3. Once the DNS and Name Server changes are made for your domains, wait a few days for them to propogate throughout the internet. Three days should be more than enough in most cases - at this point you will still be using your OLD server.

4. Move your site and software to the new server for testing - there are a few parts to this. EE runs off the database Mysql - an open source database which is installed on your server. In most cases EE also uses a web server (apache, etc.), plus the PHP page language. Your admin must install all these packages on your new server and make certain that the packages you need are compiled in with the packages. Example: you should install the GD or GD2 graphics package from PHP, as well as the spelling package, to allow for thumbnails and spelling.

4. MySql - In many cases you will be upgrading to a newer version of MySql on the new server…for instance, from 3.23 to 4.1, etc. - MySql changes quite extensively between version numbers. According to MySql, you should export (dump) your tables (from the eengine db) on the old system, and then import them into the new system. If the dump is done correctly, the db should import with no problems. However, keep in mind that there are reserved field names in MySQL which are used in EE - see this thread:
http://expressionengine.com/forums/viewthread/61765/

5. Test new installation - At this time your old server is still chugging along, so you can test your new server. Your admin can set things up so that all your domain names work JUST FOR YOU from ONE computer - you do this on your end by editing the “hosts” file on your mac or pc. This fakes out your machine and let’s you have full access to the new installation. You will immediately notice that you are the only one logged in - that’s a good thing! Check the control panels - even check and repair the mysql tables in the Utilities panel…post an entry, upload a pic - do any or all of the things that might be done regularly on your normal installation.

6. OK, now that the new system is working, and a couple of days have done by since the DNS changes were made, it’s now time to do the actual switch. The best course of action it to shut down EE on the old server - and perhaps put up an apache page saying that your site is down for maintenance. Then it’s time to move two main things:
A. All the .html and .php docs including uploading folders, etc.- if your server has multiple users, all the /usr/home directories and mail directories also need to be moved.
B. All the MySQL data, by doing another dump and import into new server

This will assume that when the new server comes up, there will be no missing posts or uploads - it is the reason why shutting down the site is a smart move!

Once the new data is loaded, your ISP or Admin can change the IP number in all the domain name DNS records and the new site will come up - well, it should!

Even though you tested the original move, you’ll want to go through again and test ,test,test.

It would be smart NOT to bring the old server up again….because some people might have it cached in their DNS and they would make entries and comments at that old server instead of the new one. Better that they have NO server for a hour or two, than they write into the wrong blog, etc.

Hopefully, we will have some folks with more experience add to the above.

Category:Tips

Categories: