WordPress:FAQ Troubleshooting

来自站长百科
Fludlen讨论 | 贡献2008年3月27日 (四) 14:35的版本
跳转至: 导航、​ 搜索

Back to FAQ 返回到常见问题解答



Administration

管理

Can my posts have titles instead of /index.php?p=76?

我的文章能有个标题而不是/index.php?p=76吗?

See: 看看:

How can I find out if I have mod_rewrite?

如果我有 mod_rewrite我怎么能找出?

To get information about your server, you can use the PHP Info function: 寻求关于你的服务器的信息,你可以使用PHP的信息功能:

  • Paste this into a new Notepad / BBEdit file
  • 将这个粘贴到一个新的记事本/ BBEdit文件


<?php phpinfo(); ?>

<?php phpinfo(); ?>


  • Save as info.php
  • info.php形式保存
  • Upload to server. Visit in your browser (www.example.com/info.php)
  • 上载到服务器。在你的浏览器中访问(www.example.com/info.php)


That will give you info about your php version and mod_rewrite.

那样做,你会得到关于你的php版本和 mod_rewrite的信息。


The info.php file returns a page outlining the details of your PHP installation. You can see if mod_rewrite is loaded. Under the apache header, look in the Loaded Modules section and see if mod_rewiite is listed.

info.php文件返回了一个页面,叙述了你的PHP安装的详细信息。你可以看看mod_rewrite模板是否已经载入了。在apache标题下,看一下载入的模块部分,看看mod_rewiite模板是否罗列出来了。

How do I change file and folder permissions?

我怎样改变文件和文件夹权限?

See: 看看:


Why are the version numbers not in any particular periodic sequence?

为什么版本号不是以任何特定的周期序列排的?

The version number for improved versions of WordPress might not follow a strictly monotonic or periodic numerical (or in the case of test releases, alphabetical) sequence, since the version numbers reflect relative progress, and the changes made to existing or previous versions. So, for example, since v1.2 is a majorly revamped version of v1.0 (with about 60% of the code having been touched), 1.1 was ’skipped’ along the way. 改进的WordPress版本的版本号也许没有遵从一种严格的单一的数字序列(或者在试验发布情况下的,字母序列),因为版本号反映了相对的进步,而且改变也是针对现有的或者以前的版本。

How do I turn on Permalinks, and what do I do about the errors?

我怎样开启 Permalinks,,我应做些什么来处理错误?

See: 看看:


What are User Levels for and what permissions do different User Levels have?

User Levels 是用来做什么的 ?不同的User Levels 拥有什么权限?

See: 看看:


Does the 644 permissions on wp-config.php compromise the username and password to all other users on my shared server?

wp-config.php上的644 权限会对与我分享服务器的其他的所有用户妥协用户名和密码吗?

This is a limitation of the way PHP is set up on your server. If you previously used MovableType, Perl was probably set up with suexec so Movable Type executed as your user. In this case, PHP is running as the web server user, which is why it has to be at least 444. There is phpsuexec but it seems many hosts don’t use it.

However this is often not an issue on modern shared hosts because even though the file is “world" readable each account is set up with a “jailshell" which keeps people locked in their home directory, and PHP can be easily modified with an open_basedir restriction to keep people from writing PHP scripts to read your files. If you are really concerned, you should contact your host to see what measures they are taking.

将PHP设置到你的服务器上的方式是有限制的,如果你先前使用Movable Type,Perl也许是与suexec一起设置的,因此Movable Type以你的用户方式来执行。在这种情况下,PHP以网络服务器用户运行,这就是它最少是444的原因。有phpsuexec,但似乎许多主机都不使用它。

然而在现代化分享的主机中,这并不是一个问题,因为即使文件是“世界性"可读的,每个帐户有一个“jailshell"的设置,这种设置将人们紧闭在自己的主目录上,而且可以通过一个open_basedir约束来轻松地改变PHP,制止人们写PHP脚本来阅读你的文件。如果你真的担心,你应该联系你的主机,看看他们采取了什么样的措施。

How do I redirect users to the index.php page after the login from wp-login.php?

wp-login.php上登录后,我怎样再次引导用户到index.php页面?

This allows you to redirect users to your blog's main page, instead of the administrative panel, after they log in. 这个能让你在你的用户登录后,将他们引导到你的博客主页,而不是管理面板上。

In wp-login.php, find the following line of code: 在wp-login.php上,找一下以下的代码行:

if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() )

if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() )

Immediately after that line, find this line: 在那一行的后面,可以找到这一行:

<$redirect_to = 'wp-admin/';


<$redirect_to = 'wp-admin/';

and change that to: 将那个改为:

$redirect_to = 'index.php';

$redirect_to = 'index.php';


If your blog is set-up to have the index page in a different directory from the WordPress files (see Wordpress:Giving_WordPress_Its_Own_Directory), then you need to make the reference to index.php with a relative path with respect to wp-login.php. For example, if your WordPress files are in a folder called wordpress, but you have an index.php file in your webroot folder, you would change the line of code to:

$redirect_to = '../index.php';

如果你的博客设置索引页在WordPress文件不同的目录上,(看设置WordPress本身的目录),接着你要用一个关于wp-login.php相关的路线index.php做出参考。例如,如果你的WordPress文件在一个称作wordpress的文件夹里,但是你的index.php 文件在你的网络根目录文件夹里,你要将代码行改为:

$redirect_to = '../index.php';



How do I change permissions for my files so I can edit them using the Template Editor?

我怎样改变我的文件权限, 那样的话我就可以用模板编辑器来编辑文件?

See: 看看:


How do I prevent my images from being hot-linked by another website?

我怎样阻止其它的站点通过热点链接来链接我的图像?

You can use your .htaccess file to protect images from being hot linked, or, in other words, being linked-to from other websites. This can be a drain on your bandwidth, because if someone links directly to the image on your site, then you lose the bandwidth.

你可以使用.htaccess文件来保护阻止你的图像被热点链接,或者换句话说,阻止其它的站点热点链接你的图像。这可能消耗你的带宽,因为如果其他人直接链接你站点上的图像,你就会丢失带宽。


Clockwatchers’ htaccess image guide provides more details.

Clockwatchers的htaccess 图像指南 提供更多的详细信息。


You can use this tool to check if the images are protected properly, and that has a few extra tips too.

你可以用这个工具来检查一下图像是不是得到了合理的保护,而且那个还有一些额外的小贴士。

For a more sophisticated method of preventing hotlinking see A List Apart's Smarter Image Hotlinking Prevention.

关于更多阻止热点链接的更成熟的方法,请看A List Apart's Smarter 防止图像热点链接.


How do I backup and restore my WordPress database using phpMyadmin?

我怎样使用phpMyadmin做备份并且重建我的WordPress数据库?

See: 看看:


How do I prevent comment flooding?

我怎样阻止评论泛滥?

Comment flooding is when a lot of comments (probably spam) are posted to your website in a very short duration of time. Mark Ghosh's article, Comment flood prevention-a really simple solution, and the related Comment flood prevention hack, allows you set a time interval between each comment to prevent successive comments from being posted too soon.

评论泛滥指的是在很短的时间内,你的网点上粘贴了许多的评论(可能是垃圾广告)。Mark Ghosh的博客 文章, 防止评论泛滥-一个很简单的解决办法,以及相关的[1],允许你在每一个评论之间设置一个时间间隔,防止随后的评论粘贴得过快。

A copy of the code modification is given below (this is for WP 1.2) :

下面有份代码的修改(针对的是WP1.2):

In wp-comments-post.php (between the comments, you should recognize the place), add the following:

在wp-comments-post.php里(在评论之中,你应该能找到位置),将下面的添加上去:

// Simple flood-protection
$lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments ORDER BY comment_date DESC LIMIT 1″);
if (!empty($lasttime)) {
$time_lastcomment= mysql2date(’U', $lasttime);
$time_newcomment= mysql2date(’U', $now);
if (($time_newcomment - $time_lastcomment) < 300)
die( __(’Sorry, this blog only allows a new comment once every 300 seconds. If you really want to write a comment,
just wait a few and hit refresh on this page. Chances are you tried to add a comment about halfway between 0 and 300 seconds.   
Comment flooders are annoying. Thank you for being patient.’) );
}


// 防止过多评论的简单方法

$lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments ORDER BY comment_date DESC LIMIT 1″);
if (!empty($lasttime)) {
$time_lastcomment= mysql2date(’U', $lasttime);
$time_newcomment= mysql2date(’U', $now);
if (($time_newcomment - $time_lastcomment) < 300)
die( __(’抱歉, 这个博客每隔300秒才允许一个新的评论。 如果你真的想写一个评论,等一会儿,并且在这个页面上点击刷新。你就可能在0至300秒之间能够增加一个评论。制作泛滥的评论的人是恼人的。感谢你耐心等待。’));}


Why can't I delete the uncategorized Category?

为什么我不能删除未归类 的种类?

Any Category with a non-zero value for # of Posts in the Administration > Manage > Categories cannot be deleted. The uncategorized Category might be assigned to some Posts, but all Pages are assigned the uncategorized Category. So even though there may be no posts assigned to the uncategorized Category, Pages are included in the count of # of Posts.

任何在管理 > 管理 > 种类中的对# of Posts有一个非零数值的种类都不可以被删除。未归类的种类可能会被分配到一些文章,但是所有的页面都被指派了未归类的种类。因此即使未归类的种类中,没有分配到任何文章,页面都包含在# of Posts的计算以内。

The default category cannot be deleted even if it is empty, however you can specify your default categories for posts or links on the Options - Writing page of the admin panel.

即使默认的种类是空的,也不能将它删除,但是你可在管理面板上的选项 - 页面中,规定你的默认种类中的文章和链接。

Why is there no Page Template option when writing or editing a Page?

为什么叫编写或者编辑一个页面的时候,没有页面模板选项?

If there is no Page Template option when writing or editing a Page it may because there is no template file with the proper structure. For the Page Template box to be available to assign to a Page there must be a least one template file in your theme that has a structure at the beginning of the template file that looks like this:

如果在编写或者编辑一个页面时,没有一个页面模板选项,也许是因为没有一个适当结构的模板文件。一个分配到[[Wordpress:Pages|页面]上的页面模板盒,至少你的主题中有一个模板文件,在模板文件的开始有一个内似以下的结构:


<?php
/*
Template Name: Links
*/
?>


<?php
/*
模板名: 链接
*/
?>


That example is from the WordPress Default themes wp-content/themes/default/links.php file.


例子来源于WordPress默认主题wp-content/themes/default/links.php文件。

See also: 也看看:

Page Templates

页面模板


Configuration

配置

How can I change how the date and / or time is displayed?

我怎样更改?日期和 / 或者时间是怎样显示的?

See: 看看:


How can I control comments people make?

我怎样控制人们做的评论?

See: 看看:


What do the Discussion Options mean?

See:

讨论选项是什么意思?

看看:


How do I install plugins?

See:

我怎样安装插件?

看看:


How can I change what appears between Categories when I post in more than one Category?

当我粘贴进的种类不止一个的时候,我怎么改变种类之间出现的东西?

To configure the way the post's categories display, open the index.php file and find the line <div class meta>. There you will see the following code:

<?php the_category() ?>

设定文章种类显示的方式,打开index.php文件,找到这一行<div class meta>.你就会看到一下的代码: <?php the_category() ?>


Inside of the parentheses ( ) and quote marks, add or change this to reflect the new look you desire.

( )括号和引号里面,加上或者改变这个,反映你想要的新面貌。

If you would like to have commas between the categories, the tag should read:

<?php the_category(',') ?>

如果你想在种类之间加上逗号,标签应该显示为:

<?php the_category(',') ?>


If you would like to have an arrow, the tag would look like this:

<?php the_category(' > ') ?>

如果你想要一个箭头记号,标签应该显示为:

<?php the_category(' > ') ?>


If you would like to have a bullet, the tag would look like this:

<?php the_category(' &bull; ') ?>

如果你想要一个bullet符号(一种划分段落的符号),标签应该显示为:

<?php the_category(' &bull; ') ?>



If you would like the "pipe" ( | ) between the categories, the tag would look like this:

<?php the_category(' | ') ?>

如果你希望在种类之间出现"竖线" ( | ),标签会显示为:

<?php the_category(' | ') ?>


Use your imagination and creativity to make the separations in the categories look any way you like.

运用你的想象力与创造力,将种类之间的区分为你喜欢的形式。

Why are all the comments being moderated?

为什么所有的评论都被审核了?

Go to the Options > Discussion panel and make sure that An administrator must approve the comment (regardless of any matches below) is unchecked. With that option selected, all comments are sent to the moderation queue to await approval. Make sure that Hold a comment in the queue if it contains more than x links is not blank and contains a number higher than zero. If this value is blank or zero, all comments containing links will be moderated. If the option mentioned above is unchecked, the link moderation value is higher than zero, and you still have this problem, your Wordpress:Spam Words list probably has blank lines, punctuation marks, or single letters between the information in the list. There should be spaces between the listed items or each item must be on its own line. If you have done this, then upgrade the comment spam plugins you have installed. If this continues to be a problem, deactivate the comment spam plugins one by one to determine the culprit and contact the plugin author for help.

转到选项 > 讨论面板,并请确保一个管理者必须批准评论 (不管下面的匹配是怎样的) 没有被选中。选择了那个选项,所有的评论就要被送到审核队列中等待被批准。确保 如果评论包括不止x个链接,在队列中按住评论 是空白的而且包含了一个大于零的数字。 如果这个数值是空白的或者是零,所有包含链接的评论都要被审核。如果上述选项都未被选中,连接是值高于零,你仍然有这个麻烦, 你的 垃圾信息 列表在列表的信息中可能还有空行,标点符号,或者单独的字母。所列的条目之间应该有间距,或者每个条目应该单起一行, 如果你完成了这一步,给你安装的过滤评论中广告的插件升级。 如果这个仍然是个问题,一个个的关闭过滤评论中广告的插件,确定问题所在,并且与插件作者联系寻求帮助。


How do I stop people from posting HTML in comments?

我怎样阻止人们在评论中粘贴HTML?

Acceptance of HTML tags in the comments field is managed in the file kses.php, located in the wp-includes folder.

在评论区接受HTML标签,是由wp-includes文件夹中的kses.php文件管理。

Open this file in a text editor, and locate the list of HTML tags near the top of the file. Each HTML tag is listed on a separate line, in the construction of a PHP array of allowed tags. Lines which begin with // are commented-out, or disabled, so lines which begin with // designate HTML tags that are not allowed in comments.


在一个文本编辑器中打开这个文件,将HTML标签列表放到文件上方附近。每个HTML标签罗列在单独的一行,以PHP数组允许的标签结构形式。以//开始的行,在评论中清除或者被关闭,因此以//开始的行,指定HTML标签允许出现在评论中。

To stop people from posting HTML in comments, edit your kses.php file as desired to allow or disallow specific HTML tags in comments, by adding // to the very beginning of the appropriate lines of the list. To exclude all HTML tags, comment out all lines which allow HTML tags. Be sure to save your file when done.

阻止人们在评论中粘贴HTML,编辑你的kses.php文件来允许或者不允许特殊的HTML标签出现在你的评论中,通过在列表上合适的行的开头加上//。清除所有的HTML标签,将所有允许HTML标签的行comment化。在执行这些的时候,确保你的文件都保存了。

Note that while you could simply delete the lines instead of commentng them out, by adding // at the start of the line you achieve the same result, while preserving the list of tags for possible re-enabling at a later date.

注你可以只是清除所有的行,而不是将它们comment化,通过在行的开头加上//,你能收到同样的效果,同时保存标签列表以便以后可能重新启用。


How do I disable comments?

我怎样禁止评论?

First, unchecked Allow people to post comments on the article on the Options > Discussion panel. This will only disabled comments on future posts. Now, to completely disable comments, you will have to edit each past post and uncheck Allow Comments from the Write Post SubPanel. Alternatively, you could run this MySQL query from the command line on a shell account or using Wordpress:phpMyAdmin: UPDATE wp_posts SET comment_status="closed";


首先,在选项 > 讨论 面板上不要选中允许人们在文章中粘贴评论。这只能在将来的文章中禁止评论。现在,需要完全的禁止评论,你就要编辑每篇文章,并且在写文章安装盘上不要选中允许评论 。另外, 你可以在一个shell帐户的命令行上运行这个这个MySQL 询问或者使用 phpMyAdmin: UPDATE wp_posts SET comment_status="closed";


If your goal is to permanently disable comments, then you should delete the wp-comments-post.php file as well.

如果你的目的是永远地禁止品论,你也应该删除wp-comments-post.php文件。

How do I disable trackbacks and pingbacks?

我怎样禁止 trackbacks 和pingbacks?

First, unchecked Allow link notifications from other Weblogs (pingbacks and trackbacks.) on the Options > Discussion panel. This will only disable trackbacks and pingbacks on future posts. Now, to completely disable trackbacks and pingbacks, you will have to edit each past post and uncheck Allow Pings from the Write Post SubPanel. Alternatively, run this MySQL query from the command line on a shell account or using PHPMyAdmin: UPDATE wp_posts SET ping_status="closed";


首先在 选项 > 讨论 面板上不要选中 允许来自其它博客的(pingback和 trackbacks.)的链接通知 这只能在将来的文章中禁用trackbacks和pingbacks。现在,要完全的禁用trackbacks 和pingbacks,你需要编辑每篇文章,并且在写文章安装盘上不要选中允许 Pings。另外可以在一个shell帐户的命令行上运行MySQL询问或者使用PHPMyAdmin: UPDATE wp_posts SET ping_status="closed";


If your goal is to permanently disable trackbacks and pingbacks, then you should delete the wp-trackback.php file as well.

如果你的目的是永久地禁用trackbacks 和 pingbacks,你也应该删除wp-trackback.php 文件。

How do I disable my RSS or syndicated feeds?

我怎样禁用我的RSS 或者 syndicated feeds?

To disable your RSS or syndicated feeds, you must delete the wp-atom.php, wp-commentsrss2.php, wp-feed.php, wp-rdf.php, wp-rss.php, and wp-rss2.php files.

禁用你的RSS or syndicated feeds,你必须删除wp-atom.php, wp-commentsrss2.php, wp-feed.php, wp-rdf.php, wp-rss.php, 和wp-rss2.php 文件。

How do I change the site admin name?

我怎样更改 站点管理 名?

To change your Admin Name, in the Administration Panel, choose the Users->Your Profile tab. Make your changes there. However, you are not able to change the username from within the Administration panel. In order to do this you must directly edit the MySQL database, however this is not recommended as your username is not often seen by other users.

更改你的管理名,在管理面板中选择用户->你的档案标签。在这儿改。然而你不能在管理面板内部更改用户名。要做到这一点,你必须直接地编辑你的MySQL数据库,但是并不推荐你这样做,因为别的用户不能经常看到你的用户名。

See: 看看:


How do I find the absolute path I need for uploading images?

我怎样找到上传图像的绝对路径?

To find the absolute path of a page, absolutepath.zip will help you. Download, unzip, ftp to the location of the page / image / directory and then call the file in your browser - http://www.example.com/images/absolutepath.php

找到一个网页的绝对路径,absolutepath.zip会帮助你。下载,解压ftp到网页 / 图像 / 目录 的地址,然后在你的浏览器- http://www.example.com/images/absolutepath.php中访问那个文件。


Which files do I change to alter the way my blog looks?

我改变哪个文件来改变我的博客外表?

The following files affect the public display of your site, and each can be easily changed by using the Built-in Editor from the Templates option in your admin screen:

以下的文件影响你的站点在公众中的显示,在你的管理屏面上的模板 选择上,通过使用内置的编辑器,你能轻松地改变每个文件。

   * index.php
     This affects the layout of your content.
 * index.php
     这影响你的内容布局。


   * style.css
     This is how the style and presentation of your blog is controlled.
  • style.css
     This is how the style and presentation of your blog is controlled.
     这个负责怎样控制你的博客的风格和呈现的方式。
   * wp-comments.php
     This controls the layout of user-submitted comments and trackbacks, and the comments submission form.
  • wp-comments.php
     这控制着用户提交的评论和trackbacks以及提及评论的形式。


   * wp-comments-popup.php
     Only needed if you decide to use a popup comments box.
     (Popup comments are off by default).
  • wp-comments-popup.php
     只有你决定使用一个弹出来的评论框是才需要这个文件。
     (默认情况下,没有弹出来的评论筐)。


Can I have popup comments?

我能拥有弹出来的评论吗?

To enable popup comments, choose the appropriate method for the version of WordPress you are using.

要让评论弹出来,你要给你使用的WordPress版本选择合适的方法。

WordPress version 2.0 Default Theme

WordPress版本 2.0 默认主题


Inside header.php add this line:

<?php comments_popup_script(); ?>

above this line:

<?php wp_head(); ?>


header.php 里加上这一行:

<?php 评论_跳出_脚本(); ?>

在这一行的上面:

<?php wp_head(); ?>


For example:

<?php comments_popup_script(); ?>
<?php wp_head(); ?>
</head>


例如:

<?php comments_popup_script(); ?>
<?php wp_head(); ?>
</head>


WordPress 2.0 Classic Theme

WordPress 2.0 经典主题


In the file header.php locate this line (line 21):

<?php //comments_popup_script(); // off by default ?>


在这件header.php 上查找这一行(第21行):

<?php //comments_popup_script(); // off by default ?>


And remove the first comment markers, changing it to this:

<?php comments_popup_script(); // off by default ?>


移动第一个评论标记,将其改为:

<?php comments_popup_script(); // off by default ?>


WordPress version 1.5 Default Theme


WordPress 1.5版本 默认主题

Inside header.php add this line:

<?php comments_popup_script(); // off by default ?>

below this line:

<?php wp_get_archives('type=monthly&format=link'); ?>


header.php加上 这一行:

<?php comments_popup_script(); // off by default ?>

在这一行的下面:

<?php wp_get_archives('type=monthly&format=link'); ?>


Example: 例如:

<?php wp_get_archives('type=monthly&format=link'); ?>
<?php comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
<?php wp_get_archives('type=monthly&format=link'); ?>
<?php comments_popup_script(); // off by default ?>
<?php wp_head(); ?>


WordPress version 1.5 Classic Theme WordPress 1.5 版本经典主题


Inside header.php is this line:

<?php //comments_popup_script(); // off by default ?>

Change that to

<?php comments_popup_script(); // off by default ?>


header.php 里是这一行:

<?php //comments_popup_script(); // off by default ?>

把那个改为

<?php comments_popup_script(); // off by default ?>


WordPress version 1.2

WordPress1.2版本


Inside index.php is this line:

<?php //comments_popup_script(); // off by default ?>

Change that to

<?php comments_popup_script(); // off by default ?>

index.php 里是这一行:

<?php //comments_popup_script(); // off by default ?>

把那个改为

<?php comments_popup_script(); // off by default ?>


How do I upload images?

我怎样上传图像?

To permit images to be uploaded to your site:

允许图像上传到你的站点:

From the admin panel, go to Options -> Miscellaneous 在管理面板上,转到Options -> Miscellaneous

  • Select the option to Allow File Uploads
  • 选择选项允许文件上传
    • If you need help with finding the absolute path, see [[Wordpress:#How_do_I_find_the_absolute_path_I_need_for_uploading_images.3F|How do I find the absolute path I need for uploading images?]].
    • 如果你需要关于找到完全路径的帮助,请看看[[Wordpress:#How_do_I_find_the_absolute_path_I_need_for_uploading_images.3F|我怎样找到上传图像的完全路径?]].
  • Then check main menu across the top. Click Upload
  • 然后在最顶端选中主菜单。点击上传
  • In Wordpress 2.0, go to Write -> Write Post or Write -> Write Page and use the upload interface therein.
  • 在Wordpress 2.0中,转到写-> 写文章 or 写 -> 写网页并且使用那里的上载界面。

Can I change where the WordPress Database Plugin saves the backups?

我能改变WordPress 数据库插件保存文件备份的位置吗?

Currently (as of WordPress 2.0) the WordPress Database Plugin saves the backups in the folder wp-content/backup-xxxxxx (where xxxxxx is a randomly generated sequence). To change the folder used, change the wp-db-backup.php file.

当前(从WordPress2.0起),WordPress数据库插件在wp-content/backup-xxxxxx 文件夹(这里的 xxxxxx 的序列是随机排的)中保存文件备份。更改使用的文件夹,就要更改wp-db-backup.php 文件。

In Version 1.7 of the WordPress Database Plugin you would change line 22 of wp-db-backup.php where it says

define('WP_BACKUP_DIR', 'wp-content/backup-' . $rand);

to something like:

define('WP_BACKUP_DIR', 'mydir/mysubdir');

在WordPress1.7版本的数据库插件中,你更改一下第22行,第22行上写着 define('WP_BACKUP_DIR', 'wp-content/backup-' . $rand);

更改为:

  define('WP_BACKUP_DIR', 'mydir/mysubdir');


Modifying

修改

Can I change the Smilies?

See:


我能更改 Smilies吗?

看看:


How do I edit files?

See:

我怎样编辑文件?

看看:


What is The Loop?

What is Loop是什么?

See: 看看:

How can I change the URL-structure for my posts?

See:

我怎样为我的文章改变URL-结构?

See:

看看:


How can I change URL-structure for my posts on a Windows server?

我怎样为我的 Windows 服务器上的文章改变URL-结构?

See: 看看:


How do I use WordPress Template Tags to change what is displayed on the blog?

See:

我怎样使用WordPress 模板标签来改变博客上显示的内容?

看看:


How do I get All links to open in a new window?

Put this inside the <head> section of your Theme's template header.php file:

<base target="_blank" />

See:


我怎样在一个新的窗口中打开所有的链接?

将这个放进你的主题的template header.php 文件的<head>部分:

<base target="_blank" />

看看:

How can I add an image to my RSS feed?

See:

我怎样在我的RSS feed中增加一个图像?

看看:


How can I stop my own comments being mailed to me?

WordPress version 1.2

我怎样制止自己的评论发送给了我自己?

WordPress version 1.2


This will stop WP from sending you a mail if the email address you used when you posted the comment was the same as the email address for the author of the post (which is the address the notification email gets sent to). This applies to v1.2 / 1.2.1 code ONLY.

当你粘贴评论时用的邮箱地址与评论的作者的邮箱地址(通知邮件发送的地址)相同的时候,这个会阻止WP向你发送邮件。这个仅用于v1.2 / 1.2.1代码。

In functions.php change the following line:

if ( == $user->user_email) return false; // If there's no email to send the comment to

to

if ( == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // If there's no email to send the comment to

在 functions.php 中,将下面的行:

if ( == $user->user_email) return false; // 如果没有邮件将评论发送到

改为

if ( == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // 如果没有邮件将评论发送到


If I turn off comments, it says "Comments Off" on the weblog. so how do I change that?

如果我关掉评论, 博客上显示 "关闭评论". 那么我怎样更改这个?

To turn your comments feature off:

WordPress version 1.2

Line 58 of wp-includes/template-functions-comment.php has the words 'Comments Off'

将你的评论特色关掉:

WordPress 1.2版本

wp-includes/template-functions-comment.php的第58行显示 '关掉评论'


WordPress version 1.3

Line 98 of wp-includes/template-functions-comment.php has the words 'Comments Off'

WordPress 1.3版本

wp-includes/template-functions-comment.php的第98行显示'关掉评论'

How do I change what is shown when I password protect a post?

To create password protected text, see Line 19 of wp-includes/template-functions-post.php for that information.

当我用密码保护一篇文章时,我怎样改变显示的内容?

创建密码保护的文章, 请看wp-includes/template-functions-post.php 的第19行。


How can I allow certain HTML tags in my comments?

WordPress versions prior to 1.2

我怎样运行某些HTML标签出现在我的评论之中?

WordPress 1.2之前的版本


If you would like to override the $allowedtags variable in kses.php you may do so in your my-hacks.php file, provided you add the following code after you set up the $allowedtags array.

define('CUSTOM_TAGS', true);

如果你想制服kses.php中的$allowedtags变量,在你的my-hacks.php文件中你可以这样做,前提是在你设置了$allowedtags数组后,你增加了以下的代码。 define('CUSTOM_TAGS', true);

How can I add advanced search ability to WordPress?

See:

我怎样给 WordPress添加高级搜索能力?

看看:


Posts

文章

How do I upload an image and display it in a post?

To permit images to be uploaded to your site:

我怎样上传一个图像并将它显示在文章中?

允许图像上传到你的站点上:



    • Select the option to Allow File Uploads
    • 选择选项 允许文件上传
  • If you need help with finding the absolute path, visit Absolute Path
  • 如果你需要关于找到绝对路径方面的帮助, 访问绝对路径


  • Then check main menu across the top. Click Upload
  • 然后在顶上方,选中主菜单。点击上传

Refer to the following articles to align the image in the post:

查阅以下的文章,看怎样在在文中排列图像:




See: 看看:


What is pingback?

See:


pingback是什么?

看看:

What is trackback?

See:

什么是 trackback?

看看:


Where is the permalink to my post?

See:

我的文章的 permalink 在哪儿?

看看:


Can I use desktop blogging software?

See

我能使用桌面博客软件吗?

See


Can I blog by email?

See


我能通过邮件写博客吗?

看看


Spam, Spammers, Comments

What can I do to stop comment spam?

See:


垃圾信息, 垃圾信息制作者,评论

我怎样做可以阻止评论中的垃圾广告?

看看:


More Information on Comment Spam

See:

更多的关于评论中垃圾广告的信息

看看:


我需要哪些的垃圾广告用语?

See:

Why are all the comments being moderated?

为什么所有的评论都被审核了?

If you are getting all comments sent to moderation when they should not, it's probably your spam words list in Administration Panel->Options -> Discussion. It probably has either a single character, OR a blank line OR extra whitespace. Take those out.

如果你所有的评论都被送去审核了,但本来不是所有的都有审核,可能因为你的垃圾广告词列在了管理面板->选项 -> 讨论上。它可能有一个单独的字母或者一个空行,或者一个空格。将这些删除。

Right click in the Spam Words box, Select All then Copy and paste it into Notepad to check it. 点击垃圾广告词语箱,选中然后复制所有的并将它粘贴到记事本中进行检查。

With spam plugins adding to that list, it's not easy to check for odd data, and it's easy to miss multiple blank lines. This way makes it easier. 检查到不固定的数据并不简单,很容易错过多个空白行,将垃圾广告插件添加到那个列表上,这样做可以更简单。

仔细地检查 :)

Importing and Exporting

引进和输出

How do I Import a WordPress WXR file when it says it is too large to import?

当显示文件太大不能引进时,我怎样引进一个WordPress WXR文件?

If a WordPress WXR file, an xml file exported from WordPress, is too large to import, there are several things you might try to overcome that limit.

如果一个WordPress WXR 文件,一个WordPress输出的xml文件太大了,不能输出,你可以尝试一些方法来打破这个限制。

  • Break the WordPress WXR file into smaller pieces by separating the data between a post and pasting the header into each file.
  • 通过将一篇文章中的数据分开,并将标题粘贴到每个文件上,将WordPress WXR 文件分成几个小部分。
  • Increase the PHP memory limit in php.ini by changing the memory_limit setting (e.g. memory_limit = 64M ;) Note: many hosts don't allow this.
  • 通过改变记忆_限制 设置(例如记忆_限制 = 64M ;),在php.ini中改变PHP的记忆限制。注:大多数主机不允许这样做:
  • Increase the PHP memory limit via .htaccess (e.g. php_value memory_limit 64M). Note: many hosts don't allow this.
  • 通过.htaccess (e.g. php_记忆限制_值 64M)来增加PHP的记忆限制。注:大多数主机不允许这样做。
  • Increase the PHP memory limit via wp-config.php (e.g. define('WP_MEMORY_LIMIT', '64MB');)
  • Increase the PHP memory limit 通过 wp-config.php (例如define('WP_MEMORY_LIMIT', '64MB');)增加PHP记忆限制


See: 看看

返回到常见问题解答