欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
WordPress
目录 |
WordPress 3.0
WordPress 3.0“Thelonious”正式版发布
在线演示
前端:http://demo.huihoo.com/wordpress/ 后台:http://demo.huihoo.com/wordpress/wp-login.php 普通用户: guest/guest 管理员: admin/admin
安装指南
创建数据库
mysqladmin -u root -p create wordpress 或 mysql>create database wordpress; mysql>GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost IDENTIFIED BY 'wordpress'; mysql>flush privileges;
设置 wp-config.php
cp wp-config-sample.php wp-config.php // ** MySQL settings ** // define('DB_NAME', 'wordpress'); // The name of the database define('DB_USER', 'wordpress'); // Your MySQL username define('DB_PASSWORD', 'wordpress'); // ...and password define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
运行安装向导,完成后续安装 http://localhost/wordpress/wp-admin/install.php
Lighttpd
wp rewrite
Plugins
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
维护
因为 WordPress 会被很多拉圾 comment 侵袭, 所以要定期情理一下数据库, 但一定要小心操作.
delete from wp_comments where comment_post_ID = 33; delete from wp_comments where comment_post_ID = 33 and comment_ID ! = 20; delete from wp_comments where comment_post_ID = 60 and comment_ID != 20 and comment_ID !=21;
升级
升级到 2.1 For all upgrade paths, such as 1.5.2 to 2.1, or 2.0, 2.0.1, 2.0.2, or 2.0.3, 2.0.4, 2.0.5, 2.06, and 2.0.7 to 2.1, http://codex.wordpress.org/Upgrading_WordPress#How_to_Upgrade_in_Five_Steps Step 1: Backup Database Tables and Files including .htaccess Step 2: Deactivate Plugins Step 3: Overwrite Files 这一步我们没有采用删除文件的方式,而是采用安装新版 WordPress 的方式, 将老版本的 wp-config.php copy过来, Step 4: Run the upgrade script 然后运行新版本的update, 完成升级。这样做的风险比较小。老版本也能运行,这样可以在新版本上根据老版本一点点修改。 Step 5: Reactivate Plugins one by one
升级出错:
WordPress database error: [Unknown column 'user_nickname' in 'field list'] SELECT ID, user_nickname, user_nicename FROM wp_users
处理方式:
alter table wp_users add column user_nickname varchar(250);
Fatal error: Cannot access empty property in wordpress/wp-admin/upgrade-functions.php on line 646
Edit wp-admin/upgrade-functions.php, and edit this line (around line 646):
$all_options->{$option->option_name} = stripslashes($option->option_value); To read: if ($option->option_name) $all_options->{$option->option_name} = stripslashes($option->option_value);
返回可登录进入Admin, 也可能包含以下错误:
WordPress database error: [Table 'wordpress.wp_linkcategories' doesn't exist] SELECT cat_id, cat_name FROM wp_linkcategories
2.5到2.8.2
准备从2.5 Update to 2.8.2
还是采用逐步升级的方式:
2.5.1 -> 2.6
2.6 -> 2.7
2.7 -> 2.8.2
2.1到2.5
从2.1升级到2.5, 目前 http://blogs.huihoo.com 使用的是2.1的wordpress, 而最新版是2.5,中间有2.1.1, 2.1.2, 2.1.3, 2.2, 2.2.1, 2.2.2, 2.2.3, 2.3, 2.3.1, 2.3.2, 2.3.3 版本,我们将采取覆盖老版本、逐步升级的策略。
2.1 -> 2.1.3 OK:)
2.1.3 -> 2.2 OK:)
2.2 -> 2.2.3 OK:)
2.2.3-> 2.3 OK:)
2.3 -> 2.3.3 OK:)
2.3.3 -> 2.5 OK:)
终于从 2.1 升级到 2.5
WordPress MU
WordPress MU : WordPress的多用户版
安装完成后,用 admin登录,
可打开数据库,修改 admin 的密码 update wp_users set user_pass="1a1dc91c907325c69271ddf0c944bc72" where ID=1; 这个是pass的md5值,因此 用 admin/pass 就可以登录成功 :)
WordPress MU 会为每个用户建立单独使用的一套表,如 id=1, id=2 的用户
| wp_1_categories | | wp_1_comments | | wp_1_link2cat | | wp_1_links | | wp_1_options | | wp_1_post2cat | | wp_1_postmeta | | wp_1_posts | | wp_2_categories | | wp_2_comments | | wp_2_link2cat | | wp_2_links | | wp_2_options | | wp_2_post2cat | | wp_2_postmeta | | wp_2_posts |
相关链接
- http://wordpress.org/
- http://wordpress.com/
- http://wiki.wordpress.org/
- WordPress英文文档 http://codex.wordpress.org/
- WordPress中文文档 http://codex.wordpress.org.cn/
- WordPress Plugins Database - http://wp-plugins.net/
- WordPress Plugin Repository - http://dev.wp-plugins.org/
- WordPress中文论坛 http://wordpress.org.cn/forums/
书籍
Paperback: 304 pages
Publisher: Peachpit Press; 1ST edition (June 29, 2006)
Language: English
ISBN: 0321450191
成功应用
- http://blog.manboo.info
- http://wordpress.com/
- http://edublogs.org/
- http://www.ebooksportal.org/
- http://sw-guide.de/
<discussion>characters_max=300</discussion>