Thứ Năm, 16 tháng 5, 2013

J2.5:Migrating from Joomla 1.5 to Joomla 2.5 Part4


Clean the Database

This procedure is optional. In the process of migration using jUpgrade, the MySQL database has grown. At the end of the migration, the old tables and some newly-acquired tables are no longer needed.

Verify the Database Prefix

In your new site's Administrator, open the Global Configuration page. Then select the Server tab and look in the Database Settings area for the Database Tables Prefix field. Any tables with that prefix must not be removed during the following cleaning operations.

Use PHPMyAdmin to Remove Excess MySQL Tables

  1. Backup the database by Exporting it. If you Drop essential tables, your site will break. Be prepared to Import the database backup and start over.
  2. In the database Structure display, check and then Drop the tables with the "jupgrade_" prefix.
  3. Test your site. If it still functions, continue. If not, restore the database by Importing it.
  4. Check and drop tables associated with your old Joomla 1.5 site. Those usually have the "jos_" prefix.
  5. Test your site again. If all is well, continue.
  6. Verify that the remaining tables have the prefix noted earlier on your site's Global Configuration page. Remove any additional tables without that prefix.
  7. Site still working? If so, you're done with this procedure.

How to Manually Migrate Joomla

If Jupgrade did not work out for you like many of us, you might want to consider manual upgrade. Be warned, however, that this process is very tedious (especially see step 6 below), and the procedure is not well tested as of yet (if at all). So just like the Jupgrade method, you will want to backup your database just in case. Before upgrading you should check to make sure every extension you want is Joomla 2.5 compatible. Also back up your directory files just in case and keep a list of the extensions you used.
Now onto the upgrade; please note that the following procedure should only be chosen if all else fails, and requires a good working knowledge of MySQL! See the last paragraph of this section for a possibly less tedious alternative to doing steps 1, 2, 6 and 7) :
Step 0: First of all, as always before big changes, backup all your data; that includes all files as well as exporting all database tables.
Step 1: If you want, you can convert the prefixes of all the tables in your database. This is especially useful if you would like to keep your 1.5 database in parallel to your new installation, at least for the transition period. It is best done using a script; the "MySQL Table Prefix Changer Tool" available at Nilop is one that worked well.
Note: Executing this script will stop your old site from working because after the prefix conversion, your old installation can't access the database anymore (it will still try to access the tables by their old prefix)! If you wish to re-enable your old Joomla installation, wait until the script has finished and import the database you exported in step 0.
In order to run the script, first upload it via FTP to the root of your site. Now you can launch it by pointing your browser at Mysite.com/prefix.php (assuming you named the script "prefix.php"). The script will ask you for several pieces of information before it can do its job. Among them is of course the new prefix you wish to use for the new version of Joomla. Joomla 1.5 defaults to a prefix of "jos" -- whatever prefix you choose make sure it is different from that; we recommend "jml" or "j16", for example. Once you have filled in all the information, the script is ready to perform the prefix conversion.
Changer.JPG
Notice in the following screen shot that the table prefix of our Joomla 1.5 installation is "jos":
Tables.JPG
For Joomla 2.5 you want it converted to "jml" as seen here:
Prefix.JPG
Step 2: Export all the database tables you would like to use on your Joomla 1.6+ site. Usually this corresponds to content and components.
Export.JPG
Step 3: Uninstall your old site including the database, files, and directories that are associated with Joomla. Or if you would rather just test the upgrade, skip this step and create a new directory for your joomla 2.5 installation.
Step 4: Install the new version of Joomla via FTP or cPanel. If you have no database associated with it, install a new database and user.
Step 5: Install upgraded components and other extensions you used before onto your new Joomla 2.5 site. This should be done now to prevent your old database tables from getting overwritten later.Note: It is possible that some developers made changes to the SQL schema of individual tables when they upgraded their extension to joomla 2.5. We recommend that you check the documentation for each extension you had installed on your old Joomla site and for which you install an upgrade into your new Joomla site concerning special database upgrade considerations.
Step 6: Convert the table schemas in the .sql file you exported in step 2 (containing your Joomla 1.5 tables) such that they are compatible with the version of Joomla! you are upgrading to. This is a very tedious process - you'll have to check the database schemas for changes between the version of Joomla you're upgrading from and the 2.5 version you're upgrading to, and modify the SQL file accordingly. Note: This step could use a more detailed description, if you have ever done a manual Joomla migration, please help and share your experiences and knowledge here!
Step 7: Import the upgraded .sql file into your Joomla 2.5 database.
Keep the following in mind: It is possible for settings to get lost depending on how each component stored them. From personal experience it worked just fine, but you may want to review the settings of each component.
For an easier way to migrate articles, categories/sections, contacts, images, and users, be sure to use J2XML for exporting and J2XML Importer for importing the data.

Troubleshooting

  • Verify that you have PHP version 5 or later. (use phpinfo() or /usr/bin/php --version)
  • jUpgrade cannot download Joomla x.y package? - When the download fails (timeouts, JavaScript issues, etc.) you can download it manually here: Browse Releases at Joomlacode.org. Put the downloaded file into your ROOT/tmp directory. Then, in the preferences of jUpgrade, you must set 'Skip Download' to 'Yes'. After that, run the jUpgrade again.
  • Are you getting errors with the progress bar in Internet Explorer (Windows XP)? - Use the Firefox browser: http://www.mozilla.com/en-US/firefox/
  • Go through the Requirements and Before You Get Started sections above and double check everything!
  • Report Bugs: http://matware.com.ar/foros/jupgrade.html
  • Support: http://matware.com.ar/foros/jupgrade.html

Check for Override Errors

Turn on debug feature: Administrator > Site > Global Configuration > System > Debug Settings > Debug System > Yes.
Load a page of the Website. Any errors? If you see any errors reported or if the content does not appear, remember that overrides must also be edited when moving from version 1.5 to later versions.
Does your (custom) template have an html directory? If yes, that indicates the presence of overrides. You can quickly check whether overrides are causing problems. Temporarily rename thetemplates/<template_name>/html directory.
Another method to locate template problems is to switch to one of the templates provided in the core distribution of Joomla such as Beez.

How You Can Contribute and Help

Creating an extension as significant as jUpgrade requires an enormous amount of time and effort considering the major structural changes between Joomla 1.5 and the later versions. Add to this the fact that during each release of Joomla 1.6 betas, the extension would have to be modified to work with the new changes between releases, and all of a sudden it's too hard for any one person to complete in a short period of time (especially when you are not being paid).
With this being said, it's time to step up and make a difference, whether big or small. Have you profited from Joomla in the last year? Are you excited about the future of Joomla? Would you like to contribute back and show your gratitude? Now you can in this project! We, as part of the Joomla community, are calling on the entire Joomla community to help out in whatever way you can. You don't have to be a master developer, just go through this tutorial on a test site and if you come across any bugs, report it. If you know how to fix it, create a patch for it. If you are a master developer, step up to the challenge.

Không có nhận xét nào:

Đăng nhận xét