原作者:WordPress 文档贡献团队;中文翻译整理:未完纪。

WordPress 升级涉及两件事:替换运行站点的代码,以及在需要时更新数据库结构。只把新文件覆盖上去,并不能保证插件、主题、缓存和旧数据库仍然协调工作。官方扩展升级说明以可恢复的备份为起点,再说明一键升级、手工替换、跨版本迁移和后台自动更新的控制方式。
本文依据 WordPress 文档贡献团队的 Upgrading WordPress 全文整理,并用它链接的 Updating WordPress 核对手工替换细节。主文标注最后更新为 2026-07-01,但仍包含旧版迁移路线;其中 PHP 5.x、7.x 和旧 WordPress 版本是历史兼容性台阶,不应当作新站部署目标。本稿没有连接站点、改动配置或执行升级。
升级之前,先证明备份能够恢复
备份至少包括数据库和 WordPress 安装目录中的全部文件。数据库保存文章、评论、选项等内容;文件备份保留媒体、主题、插件、配置及自定义内容。隐藏文件容易被漏掉,尤其是保存重写规则的 .htaccess。备份的存在并不等于备份可用:必须核对范围,并在隔离副本验证恢复流程。
原文的前四步依次是备份数据库、备份全部 WordPress 文件、确认备份可用、停用全部插件;没有完成这些步骤时不应开始手工升级。编辑补充:记录 PHP、数据库、WordPress、插件和主题版本;先在副本演练,安排维护窗口与可联系的恢复责任人。若站点继续接收订单、评论或上传,恢复旧备份会丢失备份后的写入,必须预先考虑一致性和停写范围。
优先了解一键升级为什么失败
在后台的新版本提示中点击更新链接,或进入“仪表盘 → 更新”,点击“立即更新”,即可启动一键升级。多数服务器支持这个过程。主机若提供 cPanel、Plesk 的 WP Toolkit,也可能通过主机面板更新并配置自动更新;原文还介绍了 WP Squared 的通知和自动更新控制。具体界面取决于主机供应商。
失败常与文件系统权限有关。WordPress 会根据文件所有权选择直接写入或请求连接凭据;这不意味着应该给整个站点可被任意用户写入的权限。需要凭据时应使用该站点合法的维护方式,并核对实际权限模型。不要把密码写入公开文章、脚本示例或日志。
补充来源的旧 IIS 排障段建议把应用池身份设为 LocalSystem 并扩大写权限,这会显著放大 Web 进程权限,本稿明确不采用该方案。应由管理员核对应用池专用身份和最小必要 ACL。一键升级失败之后,再考虑可控的手工替换,不能用扩大权限来代替定位问题。
手工升级:替换核心,保留站点内容
从 WordPress 官方下载页 取得对应安装包并解压。在已验证备份且插件停用的前提下,按以下顺序处理;这些是供维护者执行的步骤,本文没有执行删除操作。
- 确认目标站点绝对路径、实际文档根目录和要升级的实例;多站点或多实例服务器尤其需要避免目录误认。
- 删除旧的 wp-admin、wp-includes 目录,再上传新版本的对应目录。不要把旧核心文件残留在新目录中。
- 将新包 wp-content 目录里的所需文件合并到现有目录,不能用空的新 wp-content 替换整个旧目录;媒体、插件和主题必须保留。
- 替换安装根目录中的新版核心文件,同时保留 wp-config.php、自定义 .htaccess、站点自己的 robots.txt,以及不属于发行包的业务文件。
- 对比 wp-config-sample.php 是否新增有用配置;不要直接拿样例配置覆盖现有数据库连接和密钥。
主文旧概览列出删除 wp-content/cache 和 wp-content/plugins/widgets 的特殊例外;补充的较新常规流程又明确要求不要整体删除 wp-content。这里保留这项历史差异,但不把两个目录名作为无条件删除清单。应先确认它们确为可再生成缓存或特定旧插件遗留内容,再按当前插件文档处理。把历史例外机械应用到现代站点可能删除仍需保留的数据。
如果直接修改过默认主题而没有另取名称,新发行包中的同名文件可能覆盖这些修改。升级前保存差异,逐项迁移到兼容的新代码;不要为了保留定制而混回整套旧核心文件。将长期定制放在子主题或插件中,更容易持续更新。
让数据库与新代码配套,再恢复功能
文件替换完成后,尽快访问站点的 /wp-admin/。如果 WordPress 检测到数据库需要升级,会提供类似 /wp-admin/upgrade.php 的链接,按页面指引完成。不要只恢复旧程序文件却继续使用已经迁移的新数据库结构。
若此前自动升级失败,原文建议删除安装根目录残留的 .maintenance 文件。编辑补充:先确认确实没有正在运行的升级,再移除这个标记,避免在文件替换尚未完成时重新开放访问。
之后检查永久链接和 .htaccess,安装兼容的插件与主题更新,再逐个启用插件。清理应用、对象缓存、页面缓存及相关代理缓存,确认访客看到新结果。以公开页面、登录、编辑、上传、搜索及站点关键业务为验收点。原文“更新成功”的描述是流程预期,本稿不把它写成本站的实测结论。
跨多个大版本升级:读懂历史路线
主文指出,在备份可靠时 WordPress 可以支持大跨度升级;大型站点的执行时间和旧组件冲突仍可能使分段升级更稳妥。跨越两个以上大版本时,应考虑按阶段迁移,每个阶段保留可工作的恢复点。下面完整保留原文各区间的目标组合,作为理解旧环境依赖关系的资料。
| 原文起始区间 | 原文迁移目标 | 原文环境台阶 | 需要注意的代价 |
|---|---|---|---|
| 0.7–3.6 | 以新安装迁移到 6.2 | PHP 7.4;MySQL 8.0 / MariaDB 10.11 | 按内容迁移设计,插件和主题需要重新处理。 |
| 3.7–4.0 | 先到 4.1 或合适的 4.1.x | PHP 5.6.20+;MySQL 5.6 / MariaDB 10.0 | 旧插件和主题可能不兼容。 |
| 4.1–4.8 | 先到 4.9 或合适的 4.9.x | PHP 7.2;MySQL 5.6 / MariaDB 10.0 | 继续保留兼容检查与中间备份。 |
| 4.9–5.2 | 先到 5.3 或合适的 5.3.x | PHP 7.4;MySQL 8.0 / MariaDB 10.3 | 逐个升级插件和主题,观察错误。 |
| 5.3–6.2 | 到 6.2 | PHP 7.4;MySQL 8.0 / MariaDB 10.11 | 原文预期大多数组件可保留,但不保证具体站点。 |
| 6.3–6.8 | 到 6.8 | 至少 PHP 8.1;原文还讨论 PHP 8.2;MySQL 8.0 / MariaDB 10.11 | 仍需按实际版本与维护状态选择最终环境。 |
这些数字原样保留原文语境,不是当前支持矩阵,也不表示应在公网继续运行旧 PHP、数据库或 WordPress。历史软件如确有迁移必要,只应在受控的隔离副本中短暂使用,最终目标需再核对官方当前要求与组件兼容性;本稿没有验证任一组合。原文对 MySQL 8.0 使用“LTS”的叫法也作为原文历史措辞处理,不据此给数据库支持周期背书。
0.7–3.6 的路线着重保留内容:准备新 WordPress 文件,复制旧 uploads,使用旧数据库导出的数据建立目标数据库,填写新的 wp-config.php,然后访问后台触发迁移。原文以 mysqldump 作为导出方式的例子。导出和恢复时必须正确处理字符集;把旧数据直接按错误编码导入,可能损坏文章内容。
3.7–4.8 的中间阶段,原文建议保留主主题及必要的父子主题关系,使用 Twenty Ten 作为过渡主题,清理确定不再需要的未启用组件,停用活跃插件后替换核心。历史 WP-CLI 能否运行也受 PHP 版本限制,不能把今天下载的 CLI 直接当作兼容所有旧环境的工具。4.9–5.2 阶段完成核心升级后应重新备份,再逐一更新插件、主题;必要时研究插件官方提供的历史版本,而不是随意下载来路不明的旧包。
原文还解释,WordPress 5.0 引入新编辑器不意味着经典编辑器内容必须丢弃。实际迁移仍应抽查旧文章、短代码、嵌入媒体和依赖插件的内容块,不能把“核心向后兼容”理解为第三方功能都能无损迁移。
出现异常时,先缩小范围再考虑回退
页面布局错乱或出现代码错误时,先停用非默认插件,再逐个启用定位。若核心文件存在自定义修改,应对照新版逐项移植,不要混用旧核心。登录异常可按官方补充说明检查浏览器 Cookie,但不能把所有服务端认证问题归因于缓存。
回退通常需要同一恢复点的整站文件与数据库一起恢复。新数据库结构可能与旧代码不兼容,旧版本还可能重新暴露已修复的安全问题。没有升级前完整备份时,成功回退很困难;即使有备份,也要明确升级后新增数据如何处理。无法定位的问题应结合版本、操作步骤和脱敏错误信息查阅官方故障文档或支持论坛。
自动后台更新分成四类
WordPress 的后台自动更新包括核心、插件、主题、翻译文件。核心再区分开发版本、小版本维护与安全更新,以及大版本更新。主文说明:5.6 以前默认主要自动更新小版本和翻译;从 5.6 开始的新安装默认可更新大小版本,版本控制检出等条件会影响行为;旧安装维持原有行为,除非管理员、常量或过滤器改变设置。已运行开发版的站点还可接收开发更新。
补充来源中“主版本仍须点击更新”的描述偏向早期行为,因此本文采用主文 2026 年修订的分安装类型说明。默认值不等于每个站点的当前有效值,还要检查主机工具、插件、常量和过滤器。
用常量与过滤器表达更新政策
常量写在 wp-config.php,过滤器应放到插件,官方建议使用必须启用的 mu-plugin。不要直接把 add_filter 调用塞进 wp-config.php:加载时机不合适,可能与 WP-CLI 等环境冲突。
// 只允许核心小版本自动更新:这是一个可选择的政策,不是通用推荐。
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
WP_AUTO_UPDATE_CORE 为 true 时允许相应的开发、小和大版本更新;false 时都关闭;字符串 'minor' 只允许小版本。即使设为 true,通常只有已运行开发版的站点才会接收开发更新。该常量会覆盖后台可控制的相关设置。未定义时使用站点现有设置与安装类型默认行为。
define( 'AUTOMATIC_UPDATER_DISABLED', true ); 会关闭所有类型自动更新。原文明确不鼓励这样做,因为可能延迟维护和安全修复。过滤器 automatic_updater_disabled 返回 true 也可禁用整体更新器;这两者应理解为政策控制点,而不是处理升级报错的快捷修复。
| 过滤器 | 用途 |
|---|---|
| auto_update_core | 对核心自动更新作整体决定。 |
| allow_dev_auto_core_updates / allow_minor_auto_core_updates / allow_major_auto_core_updates | 分别控制开发、小版本、大版本核心更新。 |
| automatic_updates_is_vcs_checkout | 返回 false 可绕过版本控制检出判定;会影响受代码仓库管理的部署,不宜随意开启。 |
| auto_update_plugin / auto_update_theme | 控制插件或主题,返回 false 甚至可能抑制官方紧急安全推送。 |
| auto_update_translation | 控制翻译文件,原文默认开启。 |
| auto_core_update_send_email | 控制核心更新通知,应考虑保留失败和严重错误通知。 |
原文列出 __return_true 和 __return_false 作为快捷回调。想仅对特定插件开启自动更新,可以检查第二个参数中的插件 slug,其余情况保留原判断。以下基于原示例增加属性存在性检查和严格比较,明确属于编辑改写:
function wwj_auto_update_selected_plugins( $update, $item ) {
$slugs = array( 'akismet', 'buddypress' );
if ( isset( $item->slug ) && in_array( $item->slug, $slugs, true ) ) {
return true;
}
return $update;
}
add_filter( 'auto_update_plugin', 'wwj_auto_update_selected_plugins', 10, 2 );
插件和主题在原文描述的默认政策下,也可能因 WordPress.org API 发出的紧急安全修复指令而自动更新。站点管理员的逐项设置还会影响实际行为。名单外返回原 $update,能保留其他判断,而不是顺手把所有未列出的更新都关闭。
通知过滤器接收是否发送、邮件类型、核心更新对象和结果。类型包括 success、fail、critical,结果可能是 WP_Error。原文展示 apply_filters(...) 是说明调用签名,不是让维护者把它独立复制进配置文件触发通知。全面关闭更新邮件会减少可见性;若需降噪,应明确区分成功与故障通知。
来源、许可证与审核范围
原作者为 WordPress 文档贡献团队,主页面无个人署名。来源为 Advanced Administration Handbook:Upgrading WordPress,以及其链接的 Updating WordPress。主文官方仓库 LICENSE 为 GNU GPL version 2;本译编保留来源与许可,按 GNU GPL version 2 提供。编辑整理日期为 2026-10-05;历史升级路线的边界、安全说明与代码整理已在文中标明。WordPress 商标归 WordPress Foundation 所有。
本文代码与维护步骤仅作静态审查,没有运行 PHP、改写站点文件、执行数据库迁移或验证备份。静态检查已识别历史删除例外、扩大权限和关闭安全更新的风险,不能据此保证任一真实站点升级成功。
GNU GPL version 2 完整许可
以下逐字保留 WordPress Advanced Administration Handbook 官方仓库许可证,包括无担保声明。
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.












暂无评论内容