如何将TYPO3 4.5升级到6.2 [英] How to upgrade TYPO3 4.5 to 6.2

查看:112
本文介绍了如何将TYPO3 4.5升级到6.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将TYPO3 4.5(或6.1)升级到6.2的建议步骤是什么?我有一台Mac,并且我的网站在共享的Linux帐户上运行.

What are the recommended steps to upgrade TYPO3 4.5 (or 6.1) to 6.2? I have a mac and my site is running on a shared Linux account.

推荐答案

这是我想分享的升级实践的分步指南.感谢您提供https://jweiland.net/typo3/vortraege/typo3camp- berlin-2014.html 帮了我很多忙.

Here's a step by step guide from my upgrading practice which I would like to share. Thanks for the guide on https://jweiland.net/typo3/vortraege/typo3camp-berlin-2014.html that has helped me a lot.

请注意,这些是我的个人经历,可能适用于您的环境,也可能不适用于您的环境.认真对待一切.

Note that these are my personal experiences which may or may not apply to your environment. Treat everything carefully.

我区分快速"升级和长期"升级.对于长期"升级,您需要进行两次升级.首先,升级实时站点的副本,使所有扩展名和模板正常工作,并在准备好后声明内容冻结,并使用第一步中修改的文件重新进行升级.对于快速"升级,您可以立即声明内容冻结,进行升级和测试,然后直接部署到测试或实时环境.

I differentiate between "Quick" and "Long" upgrades. With "Long" upgrades, you do the upgrading twice. First, you upgrade a copy of the live site, get all extensions and templates working, and when you're ready, you declare the content freeze, re-doing the upgrade, using the files modified in the first step. For a "Quick" upgrade, you declare a content freeze right away, do the upgrade and tests, and then deploy to the test or live environment directly.

  • 当您准备冻结内容(BE][adminOnly] = 0)时,不要忘记检查该网站是否有用户贡献的内容?如果是这样,请禁用提交可能性,或者注意启用升级后的站点后必须重新导入哪些表.
  • When you're ready to freeze the content (BE][adminOnly] = 0), don't forget to check if the site has user contributed content? If so, either disable the possibility to submit it, or note which tables you have to re-import after enabling the upgraded site.

提示: 在本地工作.我只能参考使用MAMP Pro(请确保 专业版)在Mac上.始终注意在哪个站点(以及与哪个站点 DB)您正在工作,顺便说一句!并注意:OS X文件系统就是大小写 不敏感,在部署到Linux时可能会感到无聊(请参阅下文). 对于数据库管理,我更喜欢 http://www.sequelpro.com/ phpMyAdmin用于大多数任务.进行备份或备份非常方便 快速浏览表格,尽管它在其中缺少一些功能 与phpMyAdmin进行比较.对于 将dbs导入到实时服务器上-phpMyAdmin经常停在那里.

Hint: Work locally. I can only refer to using MAMP Pro (be sure to get the pro version) on a mac. Always be aware on which site (and with which DB) you are working, btw! And attention: OS X file system is case insensitve, which can be a bummer when deploying to Linux (see below). For the database administration, I prefer http://www.sequelpro.com/ to phpMyAdmin for most tasks. It's very handy to make backups or to quickly browse tables, although it has a few missing features in comparison with phpMyAdmin. It is also extremely reliable for importing dbs onto a live server - where phpMyAdmin can stall often.

  • 请注意是否设置了[SYS][UTF8filesystem]:通过流行的(S)FTP客户端(例如Coda或Transmit)(未测试Cyber​​duck)将文件传输到OS X可能会损坏包含UTF-8文件名的文件名.因此,在部署时,指向此类文件的所有链接都将无效.将它们打包到存档中以进行传输或使用scp.首先避免设置.

    • Beware if [SYS][UTF8filesystem] is set: transferring files to OS X via popular (S)FTP clients like Coda or Transmit (haven't tested Cyberduck) can damage the filenames containing UTF-8 filenames. Thus all links to such files will be invalid when you deploy. Pack them into an archive befor transferring or use scp. Avoid the setting in the first place.

      创建本地TYPO3实例.如果将旧"核心和新"核心保留在同一位置,则很实用,因此您可以通过symlink轻松地在它们之间进行切换.创建并连接本地数据库.

      Create your local TYPO3 instance. It's practical if you keep an "old" and a "new" core in the same location, so you can switch between them easily by symlink. Create and connect the local database.

      提示: 如果您正在使用MAMP,则必须对所有文件进行穿刺处理(除 应用程序的模板和配置文件(例如Sublime))到_www:_www. 我发现在其中为sudo chown定义一些别名很有用 〜/.bash_profile,例如alias chownmamp="sudo chown -R _www:_www ." 反之亦然.另一种可能是 暂时chmod 777所有内容-部署时要格外小心 这已被删除(find . -type f -exec chmod 644 {} \;find . -type d -exec chmod 755 {} \;)

      Hint: If you're working on MAMP, you'll have to chown all the files (except templates and config files of your apps (like Sublime)) to _www:_www. I have found it useful to define some aliases for the sudo chown in ~/.bash_profile, like alias chownmamp="sudo chown -R _www:_www ." and vice versa to your own user. Another possibility might be to temporarily chmod 777 everything - when deploying, taking extra care this is removed (find . -type f -exec chmod 644 {} \;find . -type d -exec chmod 755 {} \;)

      • 复制站点和数据库以保留未升级的版本以进行比较-即使已部署

        • Duplicate the site and the DB to keep an un-upgraded version for comparison - even after you've deployed

          初始化本地git repo,不要忘记为临时数据添加.gitignore.不时提交!

          Init a local git repo, don't forget to add .gitignore for temp data. Commit from time to time!

          提示: 如果您为本地站点和实时站点使用不同的主机名, 如有需要,请更换它们.对于命令行,我发现grep -rl 'www.site.ch' ./ | xargs sed -i 's/www.site.ch/www.localsite.dev/g'很有用.但是你当然可以 也可以在您的IDE或编辑器中执行此操作.别忘了检查 realurl_conf.php和.htaccess也是如此.为了快速运行,它也是 可以使用真实的主机名,因此您不必替换 任何东西(但无法比较同一台计算机上的网站).

          Hint: If you use different hostnames for your local and the live site, replace them where needed. For the command line, I have found grep -rl 'www.site.ch' ./ | xargs sed -i 's/www.site.ch/www.localsite.dev/g' useful. But of course you can do that in your IDE or editor too. Don't forget to check realurl_conf.php and .htaccess too. For a quick run, it is also possible to use the real hostnames, so you don't have to replace anything (but won't be able to compare sites from the same machine).

          • 您现在应该可以登录后端和安装工具
          • 提示:在MAMP上,我遇到了$TYPO3_CONF_VARS['BE']['warning_email_addr']的问题,该问题阻止登录安装工具并出现错误500,因为它无法发送电子邮件.如果发生这种情况,请在localconf.php中删除该设置以进行本地升级.

            Hint: On MAMP, I've had issues with $TYPO3_CONF_VARS['BE']['warning_email_addr'] which prevented logging into the install tool with an error 500, as it couldn't sent the email. Remove that setting in localconf.php for the local upgrade if it happens.

            预升级

            • 备份文件和数据库. (以后也要进行频繁的数据库转储)

              Prep the upgrade

              • Make a backup of files and DB. (make frequent db dumps later on too)

                重要::安装工具>数据库分析器>清除表:清除所有缓存,日志以及历史记录数据(如果可以的话).数据库越小,升级将越顺利.

                Important: Install tool > Database Analyser > Clear Tables: clear all caches, logs, also the history data (if that's ok with you). The less huge the database is, the smoother the upgrade will go.

                使前端运行.

                此外,请确保您具有管理面板.覆盖TYPO3缓存和调试性能瓶颈非常有用.此外,您可以在每次重新加载时可靠地强制执行TS渲染.在页面TS中设置config.admPanel = 1,通过admPanel=1在您的管理员用户的TS中启用它,然后使用您要查看其FE的域登录.仅当您登录该域时,才会显示adminPanel!在那里,还可以在管理员的TS中添加options.clearCache.system = 1,以便在生产模式下也可以清除系统缓存.

                Also, make sure you have the admin Panel. It's very helpful to override TYPO3 caching and to debug performance bottlenecks. Also, you can reliably force TS rendering at every reload. Set config.admPanel = 1 in page TS, enable it in your admin user's TS by admPanel=1, and log in with the domain you will be viewing the FE from. The adminPanel only shows up if you're logged in on that domain! While you're there, also add options.clearCache.system = 1 to the admin's TS, so you can clear the system cache also when in production mode.

                安装 http://typo3.org/extensions/repository/view/smoothmigration 并运行它.解决您现在可以解决的问题,例如数据库中的UTF8问题.复制剩余的报告并将其保存在Word文件或类似文件中-升级后您将无法再进行平滑迁移

                Install http://typo3.org/extensions/repository/view/smoothmigration and run it. Fix the issues you can fix now, e.g. UTF8 issues in the DB. Copy the remaining report and save it in a word file or similar - you can't run smoothmigration after the upgrade anymore

                遍历所有扩展名.我们是否需要它们?您可以找出某个插件是否与(例如)SELECT * FROM tt_content WHERE list_type = 'news_pi1'一起使用,或者查看tt_content中的所有cType = 'list'条目.如果不使用它,请考虑也删除该扩展名.还是可以将其替换为更好的扩展名,或者通过tt_content手动/重新构建? (例如,轮播,我宁愿不必为此进行扩展.但是要检查预算!一切都需要时间.

                Go through all extensions. Do we need them at all? You can find out if a plugin is used with (for example) SELECT * FROM tt_content WHERE list_type = 'news_pi1' or by looking at all cType = 'list' entries in tt_content. If it's not used, consider removing the extension too. Or can it be replaced by a better extension, or re-built by hand / via tt_content? (For example a carousel, I'd rather not have to maintain an extension for that. But check the budget! Everything takes time.

                我放弃了indexed_search,因为ke_search是一种非常可靠的替代方法,可以快速设置.

                I get rid of indexed_search, as ke_search is a very reliable alternative that is quick to set up.

                提示:使用FAL时,_cli_scheduler用户需要使用ke_search进行索引的每个文件装载的权限,否则通过调度程序进行索引将失败.

                Hint: with FAL, the _cli_scheduler user needs rights for every file mount you want to index with ke_search, else the indexing via scheduler will fail.

                • 主要任务:检查扩展程序更新.如果有兼容的扩展程序更新,请执行.但首先请检查它是否适用于新旧网站: http://typo3.org/extensions/repository/view/realurl :This version works for TYPO3 4.5.0 - 6.2.999-如果没有,请不要更新.

                  • Main task: Check for extension updates. If a compatible extension update is available, do it. But first check if it works with the old and the new site: http://typo3.org/extensions/repository/view/realurl : This version works for TYPO3 4.5.0 - 6.2.999 - if it doesn't, don't update yet.

                    请确保删除realurl_clearcache,TER版本将在6.2上终止

                    Be sure to remove realurl_clearcache, the TER version will break on 6.2

                    删除完成后,请卸载所有剩余的本地扩展.您不必卸载sysexts.

                    When you're done removing, uninstall all remaining local extensions. You don't have to uninstall sysexts.

                    中,我们现在将有很短的扩展列表.很好!

                    in typo3conf/ext we will have a quite short list of extensions now. That is good!

                    备份数据库并在安装工具中进行数据库比较.注意:请勿触摸以后需要导入的扩展名数据(tt_news,powermail,dam).如果您敢,您可以重命名或删除其他100%已过时的数据.

                    Backup the db and make a DB-Compare in the install tool. CAUTION: don't touch extension data you will need for importing later on (tt_news, powermail, dam). If you dare, you can rename or remove other, 100% obsolete data.

                    研究BE中的报告"模块并采取建议的操作

                    Study the "Reports" module in the BE and take the recommended actions

                    如果有足够的耐心,请检查网站上是否有损坏的链接-在转换为FAL时,它们可能会出现问题.

                    If you have the patience, check for broken links on the site - they may make problems when converting to FAL.

                    是否有可以肯定删除的内容/页面? (例如,古老的测试页,重复页等?)请敢将其删除.

                    Is there content / pages that can be deleted for sure? (E.g. ancient test pages, duplicates, etc?) Delete it if you dare.

                    别忘了:递归地清空所有页面的垃圾箱(模块"Trash").无需迁移已删除的内容. cf. https://forge.typo3.org/issues/62360 一次删除许多项目

                    Don't forget: Empty the trash (Module "Trash") for all pages recursively. No need to migrate deleted content. Cf. https://forge.typo3.org/issues/62360 to delete many items at once

                    重要提示:更新参考索引(在"DB Check"模块中).升级之前必须完美.

                    Important: Update the reference index (in the module "DB Check"). It has to be PERFECT before the upgrade.

                    再次进行备份...

                    • ->将核心切换到6.2

                    • -> Switch the core to 6.2

                    重新加载后端,您将进入安装工具.要连接到数据库,您可能必须输入"localhost"而不是127.0.0.1预先填充

                    Reload the backend, you will land in the install tool. To connect to the DB, you may have to enter "localhost" instead of 127.0.0.1 as prefilled

                    安装工具:检查文件夹结构和系统环境,使其全部变为绿色.阅读系统环境,直到底部:红色"项位于顶部,但蓝色"项(建议)位于底部(例如,缺少系统区域设置,如果使用UTF8-Filesystem,则需要此区域设置).

                    Install tool: check folder structure and system environment, make it all green. Read System Environment until the bottom: "Red" items are on the top, but "blue" items (recommended) are on the bottom (e.g. a missing system locale, which is needed if you use UTF8-Filesystem).

                    提示:不要过于渴望APC,请检查可用性 6.2中的内容并不完美,请参见. https://forge.typo3.org/issues/64030 (您 如果您的共享托管依赖suPHP,则无法使用它.

                    Hint: don't be too eager with APC, the availability check in 6.2 isn't perfect, cf. https://forge.typo3.org/issues/64030 (you can't use it if your shared hosting relies on suPHP).

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆