Zhen's How To: Moving Your PHP-Nuke Site
Date: Thursday, July 17 @ 22:26:01 CEST
Topic: General News


This article covers what happens during a php-nuke website transition from one server to another. We'll take the long way, from one hosting company to another. At first it might seem to involve a huge effort to move your site. However, its more time consuming than anything else, and requires a little bit of planning and coordinating. If you aren't a project manager, now is the time to learn.

The most important step that is mentioned immediately is: your friends and membership are the biggest support one can ever have. Treat them all with respect, friendship, and fairness. Without them, none of this is possible.

Read on for steps.

  1. You have decided that you no longer like your current webhost company called X. Now you have obtained another server with a company called Y. Prepare to take about a two week timeframe to complete the site move.
  2. Contact site admins at X and ask them to lower the TTL (time-to-live) time on your domain's zone files. Ask to lower it to 900 seconds. This will tell all DNS servers on the planet to update their zone information for your domain every 900 seconds. Typically the default settings are *much* longer.
  3. Ensure your new host Y will install all the proper applications: MySQL, Apache build with PHP, mod_security, mod_require_host, mod_gzip, mod_dosevasive, GD, lib-jpeg, mod_auth, mod_rewrite, and any others you may need.
  4. Get iptables with portsentry up and running to ban those hosts that attempt port scans on your server.
  5. Ensure sendmail and httpd.conf are setup correctly reflecting your domain(s).
  6. Lock down your filesystem on X such that a filesystem transfer from X to Y can take place. Leave behind the database still, but don't forget to take .htaccess files. This means, you move all files over, email, hosts.deny, etc. Create a test.php file with phpinfo(); for the content. Load it up via the server IP at Y to check connectivity.
  7. All the above can be done without you watching or staying by the computer. This step requires you stay put and don't move anywhere. Make an announcement that you are dumping your database and transferring it to the new site. Now, run a mysqldump and then transfer it quickly to the new site at Y. When on Y, import your database. Reload the site using its IP address to ensure the site comes up and is working.
  8. If all is well, modify .htaccess on your server at X to force any new requests to the new server at Y. Hence, any requests to your domain will be re-routed to the IP of the server at Y.
  9. Go to your name registrar and update your domain's DNS records. Point to the name servers at host Y. Changes should go over in a matter of hours thanks to the TTL lowering above.
  10. Keep your server at X for a couple more days to ensure all DNS servers are updated, then cancel your services at X at your own liesure.
  11. Once DNS propagates, you'll be able to access the domain name and it won't change to the IP of the new server at Y, which is what the .htaccess modification above does. Now you know your on your way to a successful move with very minimal impact to the customer. But before you do, check your email on the old server at X again to ensure you haven't missed any new messages. Double check the server once more... measure twice, cut once the old adage goes.
Good luck. This is what I did for the move of the following sites:
  1. computer cops
  2. nuke cops
  3. zhen-xjell
If you have any generic or specific questions/comments, feel free to respond cordially.





This article comes from NukeCops
http://www.nukecops.com

The URL for this story is:
http://www.nukecops.com/modules.php?name=News&file=article&sid=357