Drupal 7.x. 如何安装样本数据
April 18, 2014
本教程展示如何安装Drupal 7.x templates sample data.
-
我们已经激活了主题,并上传了模板包附带的所有模块和其他文件. 确保你遵循了本教程中的所有步骤: Drupal 7.x. 如何安装主题. 你可以在我们的帮助中心找到教程.
-
登录到管理部分,打开Configuration -> File system" page, set 私有文件系统路径" to "网站/违约/私人/文件".
-
Go to Modules and enable the “示范站点” module. 向下滚动并保存更改.
-
Go to the "Structure -> Snapshots页,选择"themeXXX" snapshot 然后点击"Reset" button. 请注意,所有内容将被替换为样本内容. The snapshot 在这些情况下可能不会显示:您没有上传所有模板文件, 的权限设置错误 “网站/违约/私人/文件” 文件夹或未设置 “私有文件系统路径” 我们之前说过的方法.
-
我们已经恢复了 snapshot. Now we should update the database. Open http://www.example.com/update.PHP(代替WWW).example.com with your domain 名称),把网站放入 维护模式 and update the database (in our case database update 不是必需的). 您的Drupal安装可能需要一个 database update. 请按照Drupal的说明和 update the database.
-
备份数据库 并删除所有Drupal表. 请注意您的 database 可能有其他引擎/安装的表. 您应该只删除Drupal表. 在我们的例子中,只有Drupal使用我们的 database.
-
Open the Import tab, click Browse and import the 违约”网站\ \私人\ \ demo \ themeXXXX文件.sql” file.
你也可以查看详细的教程 如何使用phpMyAdmin工具导入SQL文件.
-
刷新您的网站. 它现在看起来应该像模板的实时演示.
请跳过接下来的3个步骤,以防万一 Snapshot 是否安装成功 website looks properly. 请注意 database 只有在遇到问题时才应该执行导入 Snapshot installation!
在某些情况下(主要是由于) hosting 设置),您可能会遇到快照问题. 在这种情况下,您可以上传 sample data 直接导入Drupal database using a database 管理工具(例如, PhpMyAdmin ).
请随时查看下面的详细视频教程: