Hi Sorry if this is old news but I am new to Joomla and with it all being mainly MySQL driven, migrating a Test site to a Live site has been quite a challenge for me, but I cracked it anyway, and I thought it would be worth posting up a brief (or maybe not-so-breif) howto - mainly for my own records but I figured that by posting to the Lug as well it may be beneficial to others too.
This howto makes several presumptions: 1. The server is running Linux (not flavor specific but used ubuntu personally) 2. The test AND live server is running LAMP services (Linux, Apache, MySQL, and Php), or that you are migrating to a LIVE site from a test site, on the existing webserver. 3. MYSQLADMIN (CLI tool) and MYSQL-ADMIN (GUI tool) are both installed on (if applicable) both servers. 4. The sites and databases in use are named to reflect their purpose (eg joomla-test, joomla-live). 5. The MYSQL database password is for root and the password is blank (the default setting) 6. The siteroot is /var/www If these presumptions are different from your own setup, you will be expected to acommodate accordingly using your favourite application for the task, and enter / specify your own customised passwords accordingly HOWTO: Migrate a Joomla site from Test to Live. Existing site: - Joomla! 1.5 site - site name is joomla-test, served up out of /var/www/joomla-test - mysql database name is joomla-test - a fictitious joomla 1.5 template called "mytemplate" has been installed, and css / images have been customised within that template, this also needs to be moved across to the live site. Step One: Create the new MySQL database. open terminal su enter password #mysqladmin create joomla-live # Step 2: Create the new siteroot in /var/www in terminal, as root cd /var/www mkdir joomla-live in nautilus (gui explorer) navigate to the new folder /var/www/joomla-live folder is empty - this folder will become the siteroot for the live implementation download from joomla website joomla15RC.zip (or the same version of Joomla! used for the test site) into the empty folder /var/www/joomla-live unpack the zip file by right clicking it and selecting "unpack here" The site is in a "pre-installed" state. open up firefox (or your preferred web browser) navigate to http://localhost/joomla-live complete the setup - ensuring you point the site to the new blank database joomla-live. call the website joomla-live too when prompted during setup and also choose "insert dummy data" too - to generate some fake content. now get the zip file for the template "mytemplate" (this should be the template you are using in the test site). Install the template via the administrator controls in Joomla. Now - becuase you changed some of the images and CSS, you now need to migrate them across to the new site, this is done simpy by copying the entire directory under and including /var/www/joomla-test/templates/mytemplate and copying it into /var/www/joomla-live/templates - when prompted, choose "overwrite all". Now refresh the live site again and you should see that the live site is now using the customised template from test, but still has the dummy data from the installation. Step 3: Restore the database from test into live. now, open up mysql-admin (a gui administration tool for mysql) logon to the server using your credentials take a backup of the database called joomla-test this will generate a large SQL file which is readable in gedit *** THIS BIT IS IMPORTANT *** now open up the .sql file, and replace all instances of "joomla-test" (without the quotes) with "joomla-live" (without the quotes). save the file. ***************************** now back in terminal, as root, run the following to drop the joomla-live database...* mysqladmin drop joomla-live ...and create another new blank database called joomla-live mysqladmin create joomla-live *(this was necessary because mysql-admin (the gui tool) will fail to restore the database over the existing database because the tables already exist, and it may not be able to drop them, so just drop the whole database and create a fresh one again, but this has to be done after you have gone through the joomla site setup process first, which also requires a fresh database be accessible, there is no need to backup the live database at this point as the database is full of dummy data from the installation anyway. it was just needed to get the site up and running and get the configuration.phpfile set up correctly to look at the right database). Now go back into mysql-admin (the gui tool) and restore the database file - (note that because we changed all instances of joomla-test to joomla-live in the sql file it will now generate the tables in joomla-live instead of joomla-test). The restore should be successful. Now refresh the live site again, and voila! the site is successfully migrated. and should now be an exact copy of the test site with all your content, news items etc.... In your browser just navigate to http://localhost/joomla-live/administratorand log in as the site admin and just check that the articles are showing up in article manager, edit one of the articles and save it, and compare it with test, this will just make sure you havent got anything pointing back at the test database and prove that the two sites are now separate entities. You'll probably find no end of mistakes, but this should be enough to jog my memory later on, hope you find it useful, if not just archive it because you never know when you might need it. I am also guessing that if you had images in the test site, you'll also need to copy those to the same locations in live too. Regards Richard -- ***** Richard Forth "I used to be indecisive, but now, I''m not so sure!" *****
_______________________________________________ Peterboro mailing list [email protected] https://mailman.lug.org.uk/mailman/listinfo/peterboro
