OK...
I have setup a decent site that is a work in progress for my company.
The hard part (for me) is now I need to move it to a production server....
I have not tried the move yet but I am guessing that it will consist of a mysql dump and a tar of the webserver...
Is this all?
Moving entire site to new server?
-
- Posts: 13
- Joined: Sat 2. Oct 2004, 15:45
- Contact:
Hi
I recently moved a site from my dev server to a production server. Here are the steps I followed:
1) the hardest part was the mysql dump. You can get phpMyAdmin to provide a compressed archive quite easily. But, the problem for me was the condition of the dump. Various entries in the database are entered sequentially based on an auto increment. The dump I got from phpMyAdmin produced records that were not always sequential.
I had a further problem with the dump and this more serious. Record values were not always dumped in a form that were usable without a lot of editing. For example, image attributes such as height='50' and border ='0' would be dumped as height=''50'' and border = ''0'' rather than height =\'50\' and border = \'0\'. This meant that I had to go through each line of the dump and manually edit the entire dump. Not much fun.
I tried a number of other db dump apps but nearly all were based on the code used by phpMyAdmin - except one. A.M.B.T. at ambt.sourceforge.net dumps the db tables perfectly. The app is on the raw side and needs some additional features (such as compressing the dump and emailing it to a designated address so it con be used as a backup tool), but it meets the primary requirement perfectly.
I then did some basic 'search and replace' editing of the dump to enable me to install the db via a php file rather than an sql file. That is, I add to each line of the dump $query[] = "....";. Then I add a db connection at the top of the dump and a for loop at the bottom.
If you have a lot of records in your database, you may want to break the dump - php script into several parts. The site I was move had around 44,000 records and I broke it into four parts.
Check for any code entries in the dump that refer to the original site such as 'http://localhost/...' and edit accordingly.
FTP the dump.php file(s) to the production server and run the dump.php script via the web browser
2) Next, create an archive of the files on the original site. Zip is ok; a gz'd tar is better as it is smaller. Upload the archive to the production site. If you have shell access, uncompress the archive. If not, get the ISP administrator to do it for you.
3) Delete the archive as it is just taking up room.
4) Your site is now operational on the new server. But check it out in case you missed some links still referring to the old site.
Done.
I recently moved a site from my dev server to a production server. Here are the steps I followed:
1) the hardest part was the mysql dump. You can get phpMyAdmin to provide a compressed archive quite easily. But, the problem for me was the condition of the dump. Various entries in the database are entered sequentially based on an auto increment. The dump I got from phpMyAdmin produced records that were not always sequential.
I had a further problem with the dump and this more serious. Record values were not always dumped in a form that were usable without a lot of editing. For example, image attributes such as height='50' and border ='0' would be dumped as height=''50'' and border = ''0'' rather than height =\'50\' and border = \'0\'. This meant that I had to go through each line of the dump and manually edit the entire dump. Not much fun.
I tried a number of other db dump apps but nearly all were based on the code used by phpMyAdmin - except one. A.M.B.T. at ambt.sourceforge.net dumps the db tables perfectly. The app is on the raw side and needs some additional features (such as compressing the dump and emailing it to a designated address so it con be used as a backup tool), but it meets the primary requirement perfectly.
I then did some basic 'search and replace' editing of the dump to enable me to install the db via a php file rather than an sql file. That is, I add to each line of the dump $query[] = "....";. Then I add a db connection at the top of the dump and a for loop at the bottom.
If you have a lot of records in your database, you may want to break the dump - php script into several parts. The site I was move had around 44,000 records and I broke it into four parts.
Check for any code entries in the dump that refer to the original site such as 'http://localhost/...' and edit accordingly.
FTP the dump.php file(s) to the production server and run the dump.php script via the web browser
2) Next, create an archive of the files on the original site. Zip is ok; a gz'd tar is better as it is smaller. Upload the archive to the production site. If you have shell access, uncompress the archive. If not, get the ISP administrator to do it for you.
3) Delete the archive as it is just taking up room.
4) Your site is now operational on the new server. But check it out in case you missed some links still referring to the old site.
Done.

2 + 2 = 5 for really large values of 2
-
- Posts: 13
- Joined: Sat 2. Oct 2004, 15:45
- Contact:
for a nice sql database sync-ing tool you could do worse than SQLyog @ http://www.webyog.com
Many Thanks...
This should be organized, checked and submitted as a how-to...
I can't believe it is all that uncommon to do work on a server other than your production server.
Once again, many thanks for the time and effort....open source and open minded people RULE!
I can't believe it is all that uncommon to do work on a server other than your production server.
Once again, many thanks for the time and effort....open source and open minded people RULE!