一步步將 Joomla 2.5 遷移(Migration)至 3.x

From Joomla! Documentation

Revision as of 04:09, 5 June 2015 by Asika32764 (talk | contribs) (Created page with "Note on Core Supported Extensions:'''如果你用了某些核心套件,(廣告、聯絡人、訊息、新聞、重導向、搜尋與智慧搜尋等),在 Joomla 3.4 已...")

本文將一步步的將你的 Joomla 2.5 網站遷移到 3.x。由於實際的應用情境可能有數百種,我們將給您一個最基本的流程可以遵循。大量的第三方擴充套件可能會造成較為複雜的遷移流程,建議您可以聯絡第三方套件的作者詢問相關建議來幫助您遷移這些套件至最新版本。

導覽

Joomla 2.5 至 3.x 的遷移其實很簡單,因為核心功能與套間皆能透過一鍵遷移完成。許多第三方套件也可以透過後台一鍵遷移來更新至最新版。但有一部分的套件卻不行。你必須一個一個的確認這些套件能否被遷移至 3.x 使用。如果你尚未準備好,你可以在遵循下面的流程之前,預先閱讀 Self AssessmentPlanning for 2.5 to 3.x Migration

Joomla 的核心套件

  • Categories (分類)
  • Articles (文章)
  • Menus (選單)
  • Modules (模組)
  • Banners (廣告)
  • Contacts (聯絡人)
  • Messaging (訊息)
  • Newsfeeds (新聞連播)
  • Redirect (重導向)
  • Search (搜尋)
  • Smart Search (智慧搜尋)
  • Weblinks (網站連結)

較大或較複雜的 2.5 網站遷移至 3.x 的過程

一鍵更新在多數情況下可以良好的運作,但在某些較大型,或較為複雜的網站下可能就沒那了適合。為了這樣子的複雜網站遷移,您可能需要遵循一些標準化的遷移過程,並暫時避免使用一鍵更新。您可以先參考以下文章: planning 1.5 to 3.xmigrating from Joomla 1.5 to 3.x,只要將文章中的 1.5 換成 2.5 來操作即可。

逐步操作過程

準備工作環境

  1. 備份你的 2.5 網站。你可以使用推薦的工具(見本頁最下方),或者手動做這件事。
  2. 開始進行前,確定你的環境符合 technical requirements for Joomla 3 這篇文章所描述。
  3. 建立一個新的資料庫與使用者來還原你的 2.5 網站。
  4. 建立一個新的測試用 2.5 網站來當做作業環境,還原你原本的 2.5 網站的資料。
  5. 在測試空間中,先將 Joomla 2.5 更新至最新版本(目前是 2.5.28)
  6. 確保你的資料庫結構(Schema)是最新版,可以前往: 擴充套件管理 → 資料庫 分頁 ,如果發現資料庫不是最新版,按下 修復 按鈕。
  7. 測試您的網站
  8. 再次備份

逐步處理每個擴充套件

  1. 接著你需要一一檢視你的擴充套件,確認這些套件個別需要更新或是移除。在 Joomla 2.5.28 中,你可以前往: 擴充套件管理  更新 分頁 並按下 尋找更新 ,接著會在「管理」分頁中的版本欄位出現相容性提示。 此功能只有在該擴充套件支援後台一鍵更新時才會出現。如果你安裝的套件不支援後台一鍵更新,則你需要參考下方的資訊來取的更多細節。這些套件也會有提示。你需要根據這些套件或套件包的資訊去聯絡作者以確定該如何更新至最新版。
  2. 前往 擴充套件管理  管理 分頁
  3. 選擇「類型」下拉選單
  4. 選擇「套件包」類型
    之所以先選擇「套件包」,是因為當套件包需要被刪除時,可以一併刪除所有關連的套件。
  5. 移除所有不支援 Joomla 3.x 的套件包
  6. 重複這個步驟去刪除所有類型的套件,包含:元件、模組、外掛、函數庫、語言、檔案與佈景。如果作者是「Joomla Project」,則不要刪除。「智慧搜尋」的作者欄位雖然是空的,但依舊由 Joomla 官方所維護。除此之外,確保你移除了所有不支援 Joomla 3.x 的套件。
    NOTE! 你無法移除任何被設為「預設」的佈景主題,因此最好先將內建佈景設為預設,例如 Beez 或 Atomic,接著再把原本的佈景刪除掉。
  7. Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can use the Third-Party Extension Inventory Worksheet or just copy/paste them into a document for reference.
  8. Update all extensions to the latest versions.
  9. Before and as you update, note if the extensions have both 2.5 & 3.x versions in the same package. If so, they will be fine to "one-click update." If not, and 2.5 and 3.x have different packages, you need to look at them case by case. They will normally fall into one of the following scenarios:
    • The extension has separate packages but upon upgrading to 3.x, they automatically detect this and still work. Make sure the developer confirms this.
    • The extension has separate packages that need to be uninstalled in 2.5 and then installed with the Joomla 3.x version once the site is migrated. An example of this might be a content plugin. It is very simple to uninstall it in 2.5 and then install it again in 3.x.
    • See Template Considerations for more specific information on templates.
Note on Core Supported Extensions:如果你用了某些核心套件,(廣告、聯絡人、訊息、新聞、重導向、搜尋與智慧搜尋等),在 Joomla 3.4 已經被解除依賴了,Joomla 更新時會視情況是否一同更新這些套件。

Going to Joomla! 3.x

Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 3 remain in your installation, continue with the following steps:

  1. Go to System  Global Configuration  Server tab and turn Error Reporting from System Default to Maximum. Make sure to Save & Close.
  2. Go to Extensions  Plugin Manager and enter Remember Me into the Filter and press enter.
  3. Disable the Remember Me plugin by clicking the green check mark and making it a red circle.
  4. Take another backup.
  5. Recommended but not required: Fix assets. (Fixing the assets table). See below for a tool to do this in just a few clicks.
  6. Go to Components  Joomla Update. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.
  7. Select Short Term Support (This is the current text - it may be different in the future) from the drop-down for Update server.
  8. Click Save & Close.
  9. You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package.
  10. If the update is not showing up, go to Extension manager  Update and press Purge Cache from the toolbar. Now the update to Joomla! 3 should show up.
  11. Cross your fingers, make sure you turned off Remember Me and that you have a backup from just before this point.
  12. Click the Install the Update button.
  13. Watch the spinning circle go round and round and feel the anxiety building. No, just kidding. The amount of time the wheel spins is dependent on your site, Internet connection and server speed.
  14. If all goes well, you will get to a totally new look to the backend administrator panel.
  15. Click the Purge Cache button.
  16. Go to Extensions  Extension Manager  Database and click Fix.
  17. In the Extension Manager, go to Discover and see if there are any extensions to install.
  18. Recommended but not required: Fix assets. (Fixing the assets table). See below for a tool to do this in just a few clicks.
  19. Enable Remember Me from the Plugin Manager.
  20. Go to the frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see common errors during migration.
  21. Take a backup.
  22. At this point, it would be prudent to clear your browser's cache. Some browsers, notably Firefox, will retain old version 2.5 files. That caching might prevent the operation of the Save and Save & Close buttons in the Administrator.
  23. Go to Content  Article Manager  Options button  Editing Layout tab and set the Save History to Yes.
  24. Install your new template or other extensions if you have them to install. Back up often.
  25. Configure them. Back up often.
  26. Test everything. Back up often.
  27. If everything works as expected, turn Error Reporting back to System Default (System  Global Configuration  Server tab). Make sure to Save & Close.

Going Live with your Joomla! 3.x Site

  1. When you’re ready to go live, back up your 2.5 site for the last time. Restore it in a subdirectory or subdomain if you would like to.
  2. Back up your Joomla! 3.x site and move or restore your Joomla! 3.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).
  3. Test again.
  4. Remove the Joomla! 2.5 site from the server within a couple of days unless you have edited your robots.txt file to block the search engine spiders.
  5. Remove all development sites you may have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server.

If you had data change on the 2.5 site while you were migrating to 3.x, you will want to get that data moved over to the 3.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a transfer tool/third-party extension.

Suggested Tools