Godaddy Drupal Update

时间:2025-04-01 11:35:13

Godaddy对Drupal默认安装仅仅支持到7.22,眼下Drupal已经升级到7.28,安装完Drupal 7.22后,仅仅能手工升级。

安装Drupal在:https://hostingconnection.godaddy.com/Application/Drupal.aspx

  1. 去 Administration > Configuration > Development > Maintenance mode下. 把"Put site into maintenance
    mode" 选择框打勾,并保存配置

  2. 做好原来文件和数据库的备份

  3. 删除(除了sites文件夹和
    .htaccess)全部文件

  4. 上传新版本号的Drupal,一定要用Hosting -> Files & FTP -> File Manager

    1. Upload “drupal-7.xx.zip”

    2. 右点 “drupal-7.xx.zip” ,选“Extract”,选你放的文件夹,点 OK

    3. 进入解压缩的文件夹,选中全部的文件夹和文件(除了sites)

    4. 选 Move ,在打开的“Move Files and Folders”对话框里选文件夹,点OK

    5. 数据库升级:http://www.yoursite.com/update.php

  5. 修正http://www.yoursite.com/admin/reports/status下的错误:

    Temporary files directory
    Not fully protected

    See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the /tmp directory to help protect against
    arbitrary code execution.

    这个错误是因为tmp文件夹的权限不正确:

    1. 建立一个.htaccess文件,内容是:

      Deny from all



      # Turn off all options we don't need.

      Options None

      Options +FollowSymLinks



      # Set the catch-all handler to prevent scripts from being executed.

      SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006

      <Files *>

       # Override the handler again if we're run later in the evaluation list.

       SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003

      </Files>



      # If we know how to do it safely, disable the PHP engine entirely.

      <IfModule mod_php5.c>

       php_flag engine off

      </IfModule>

    2. 建立tmp文件夹(为了安全,最好是和drupal平级文件夹)

    3. Administration > Configuration > Media > File system

    4. 改动 Temporary directory,成为../tmp (假设tmp和drupal平级)

    5. 把.htaccess放到tmp的文件夹下