WordPress:FAQ Installation

来自站长百科
跳转至: 导航、​ 搜索

返回到常见问题解答

安装

我怎样安装 WordPress?

也看看:

什么是著名的5分钟安装?

也看看:

我怎样为我的 WordPress 博客找一个好的主机?

也看看:

我怎样安装使用CPanel / CPanel X?

也看看:

我怎样配置 'wp-config' 文件?

也看看:

安装 WordPress的必须条件是什么?

也看看:

我怎样使 WordPress 使用我的语言?

也看看

我需要创建一个数据库吗?

WordPress需要有权限进入一个MySQL 数据库数据库来储存信息。因此你需要一个数据库。

你可以创建一个数据库如果:

  1. 你还没有在服务器上创建一个
  2. 你的主机给你提供了不止一个的数据库,你希望为你设置的博客提供一个单独的数据库。

为每一个WordPress安装都创建一个新的数据库,并不重要。

  • 如果你为多个WordPress安装使用同一个数据库,注意编辑wp-config.php|wp-config.php文件,确保每一个安装都有一个唯一的数据库前缀。
  • 如果你为一个新的博客,设置一个新的数据库,编辑wp-config.php|wp-config.php,确保数据库名和其它的详细信息都是正确的。

也看看:

当我试着看我的站点的时候,我遇到的403错误是什么?

“症状:”在你的管理帐户上输入了正确的用户名和密码后,你似乎还不能登录。你得到了一个错误的消息像下面的:

你没有被授权访问这个页面。你也许没有权限来访问
这个目录或者页面,使用你提供的信任状。
如果你相信你能够访问这个目录或者页面,请使用在personal.fredsmith.com主页上罗列的任何一个邮箱地址或者电话号码,与网络站点联系。你可以点击搜索在Internet.HTTP Error403-Forbidden”

上查找更多的信息。


“解决办法:”如果你的帐户由一个Windows服务器托管,这可能是一个有关目录索引的问题。服务器默认的配置是加载index.htm, index.html, default.htm, default.html, default.asp文件。


WordPress是在PHP中完成的因此默认的页面是index.php。这不是默认配置的一部分因此我们要添加它。 这样做,你就要在“控制面板”中点击“网络选择”。然后下滚到“目录索引”部分将index.php添加到“目录索引”

如果需要的话,与你的网络主机联系,寻求这个问题方面的支持。

我能给WordPress文件夹重新命名吗?

如果你还没有安装WordPress,你可以在上传文件前,甚至于上传文件后,给WordPress文件重新命名。

如果你已经安装WordPress,你想要给文件夹重新命名,以管理者身份登录到博客,将下面的设置改一下选择 >

一般的:
  • WordPress地址(URI):
  • 博客地址(URI):

你一旦完成了这一步,你就可以为拥有WordPress文件的目录或者文件夹重新命名了。


也看看:

我怎样重新设置我的密码?

也看看:

为什么我上载的目录是 "C:apachehtdocswordpress"?

When you specified the upload path, you used backslashes.

Use forward slashes "/" to specify the path to the directory. 当你指定上载的路线时,你使用反斜线符号。使用顺斜线“?”来指定到目录的路线。

我能在 Windows 2000上安装WordPress吗?

Do NOT use MySQL database version 4.1.7 if you are trying to get WordPress installed using a Windows platform. Read this post originally made to the forums:

如果你使用一个Windows平台来安装WordPress,“不要”使用MySQL database|MySQL数据库4.1.7版本。阅读一下这个原先为论坛所写的文章: "To all those having problems installing Wordpress on your own Windows 2000 (and other Win OS versions) workstation - and maybe some host servers, too: Do not use MySQL 4.1.7 - it is the problem if you get "Error establishing a database connection!". It does not seem compatible with the other components. Use MYSQL 4.0.22 instead.

“对于那些在你的Windows2000(或者其它的Win OS 版本)工作台-也许也有一些主机服务器上安装WordPress有困难的人:不要使用MySQL4.1.7-如果你收到“错误建立了一个数据库连接!”,这正是问题所在。它似乎与其它的组成成分不兼容。使用MYSQL4.0.22作为代替。,

Thanks to the Reply by ADAMANT in response to the POST of Nov 6, 2004 02:21:29 by ANTOINE, the Wordpress installation really did become only 5 minutes, after two days of frustration: < br />
多亏了ADAMANT响应并回复了ANTOINE在2004年11月6日02时21分29秒发的文章,在经历了两天的挫败后,WordPress安装的确变成了5分钟: < br />

I started with Windows 2000, PHP 4.3.9, Apache 1.3.33 and MySQL 4.1.7. I spent two days checking my wp-config.php literally 100 times; making changes; troubleshooting my database, using every known name for my host (localhost, 127.0.0.1, <IP address>, computer name, etc...) to no avail. I kept getting:

"Error establishing a database connection!" ...

我从Windows2000,PHP4.3.9,Apache1.3.33和MySQL4.1.7开始.我花了两天逐字地检查了100遍我的wp-config.php;做一些改变;发现并修理我的数据库故障.为我的主机使用每一个已知的名字.(本地主机,127.0.0.1,<IP地址>,计算机名,等等…)完全无用.我还是得到:

“错误建立一个数据库连接!”…


I knew it wasn't my config. So thanks to ADAMANT's suggestion, I uninstalled MySQL 4.1.7 and downloaded and installed MySQL 4.0.22 from mysql.org. After installing and configuring the new (old) MySQL, which took approximately 7 minutes (very easy), I ran the install.php once again and YES!! it actually took less than 5 minutes for the Wordpress install.

我知道它不是我的配置.因此感谢ADAMANT的建议,我卸载了MySQL4.1.7并且从mysql.org上下载和安装了MySQL4.0.22.在安装和配置了新的(旧的)MySQL之后,这个过程花了大约7分钟(非常简单),我再次运行了install.php并且成功了!!!WordPress安装的确发了不到5分钟的时间.


NOTE: the Apache web site says NOT to use Apache 2 in production. So, after all my wasted time with the latest MySQL, I suggest the following to those who can control their environment:

PHP 4.3.9, Apache 1.3.33 and MySQL 4.0.22. On Windows at least, they all work well together."



Steven

注: Apache网站拒绝使用生产的Apache2. 因此,在我将时间浪费在MySQL上后,我对那些自己能控制自己环境的人,提出以下的建议:

Windows上至少有PHP4.3.9,Apache1.3.33和MySQL4.0.22, 它们一起运转的很好.”



Steven


UPDATE: MySQL 4.1.7 uses a new password encryption system that is incompatible with prior methods. If you want to get WordPress working with a 4.1.7 database, you need to make sure your user password is set as an old-style password (password-old instead of password, if you're using mysqladmin). – Nabil “更新”:MySQL使用一种新的密码加密系统,与以往的方法不相调和.如果你想让WordPress与4.1.7数据库合作,你要确定你的用户密码是以一个旧形式密码设定的(如果你使用mysqladmin,旧密码而不是新密码).—Nabil


ADDITIONAL: As stated above by Nabil, you can force Post 4.1.7 MySQL systems to use the old password lengths. From the MySQL command line interface, as a user that can manipulate the mysql tables (most likely root): “附加”:如上述Nabil所说的,你可以强迫Post4.1.7MySQL系统使用旧的密码长度.从MySQL命令行界面,用户可以操作mysql表(最有可能是根):


USE mysql;

使用mysql;

SET PASSWORD FOR 'wordpressuser'@'localhost' = OLD_PASSWORD('somePassword444');
FLUSH PRIVILEGES;

为’wordpressuser@localhost’=OLD_PASSWARD设置密码(‘ somePassward444’); FLUSH PRIVILEGES;

As the normal password methods will result in the new style password function being used. Another hack would be to run the mysql service with --old-passwords, but I've seen the above password method work under 4.1.19 and 4.1.20 on an XP install - Grey 因为正常的密码的使用方法,会导致新型的密码功能的使用.另一个改进是用老式的密码来运行mysql服务,但是我看到了以上的密码在一个XP安装下,在4.1.19和4.1.20上运行- Grey

Note: The above are actual user comments, and may be subjective in their content. It is hoped that it will be of help to some users who face the specific problems that are addressed by this question. “注:”以上的确是用户们的评论,内容可能有点主观.希望这对一些遇到了一些像这个问题所提及的,同样的特别问题的用户有所帮助.


高级安装

我怎样安装文件在不同目录的WordPress?

This also answers the questions: 这也回答了这些问题:


  • How can I have my blog in one folder but my index at root?
  • 我怎样使我的博客放到一个文件夹但是我的索引在根?
  • How can I have people see my blog at www.example.com but keep all the files in www.example.com/wordpress?
  • 我怎样使人们在www.example.com上看我的博客但是将所有的文件保存在www.example.com/wordpress?
  • How do I install WordPress in a different directory than where the index.php resides?
  • 我怎样将WordPress安装在不同的目录上而不仅仅是index.php所在地?

See also: 也看看:

我怎样将博客在人们面前隐藏起来?

Whether you are testing a new version of WordPress, setting up a new blog or have some other reason to limit access, the following information may help you keep unwanted visitors out. 不管你是正在测试一个新版本的WordPress,设置一个新的博客,还是因为一些其它的原因来限制权限,以下的信息可能会帮助你让不必要的游客离开。

Apache Apache


There is no guaranteed way to do this. You can use the .htaccess file (which also contains your permalink code) to check for certain IP addresses and prevent them from viewing your site. This will only stop the IP address, not the person, so if they have access to an allowed IP address, they can get to your page. One tutorial for this is located at Clockwatchers.com 没有保证的方式做到这一点。你可以使用.htaccess文件(这个文件也包含了你的permalink代码)来核实一些特别的IP地址,阻止它们访问你的站点。这个只能阻止IP地址,而不是阻止人,因此如果他们能使用一个允许的IP地址,他们可以到达你的网页。一个关于这个的指南位于Clockwatchers.com


An .htaccess file can also be used to prevent others from "hot-linking" to your images (bandwidth theft) or to set up a password protected blog. 一个.htaccess文件可以用来阻止他人从“热点链接”到达你的图像(带宽盗窃)或者设置一个密码保护的博客。


Apache Basic Authentication Apache 基本证明


To require a password to access your site using .htaccess and .htpasswd: Clockwatchers.com .htpasswd. 要求一个密码,使用你的站点,使用.htaccess.htpasswd: http://www.clockwatchers.com/htaccess_password.html Clockwatchers.com .htpasswd].


Tools that help you create the files necessary to password protect your site: Clockwatchers.com .htaccess And .htpasswd Tools 对于保护你的站点的密码是必不可少的文件,帮你创建这个文件的工具:Clockwatchers.com .htaccess And .htpasswd Tools


Note: When your site is accessed the password is encoded weakly using Base64 and can be easily intercepted and decoded. “注:”当你的站点被访问,密码编码的非常弱,使用的是Base64,就能非常容易地被截取和破译。


Windows IIS Basic Authentication Windows IIS 基本证明


To require a password if your site is hosted on IIS, you can deselect Allow Anonymous Access and select Basic Authentication. You'll also need to have a username with a password. 如果你的站点是由IIS托管,需要一个密码,你可以取消选定 允许匿名访问 并且选定 基本证明。你也要有一个带密码的用户名。


Note: When your site is accessed the password is encoded weakly using Base64 and can be easily intercepted and decoded. “注:”当你的站点被访问,密码编码的非常弱,使用的是Base64,就能非常容易地被截取和破译。


See also: 也看看J

Microsoft Support – 怎样:配置网络信息服务网络证明


Search Engines: Spiders and Bots 搜索引擎: Spiders and Bots'

Search Engines will index your site and cache your content. If you do not want this to happen, use a file called robots.txt. More details can be found at SearchEngineWorld.com 搜索引擎会将你的站点编入索引中并且隐藏你的内容。如果你不想让这个发生,使用一个称作robots.txt的文件。更多信息可以在SearchEngineWorld.com中找到。


我怎样解决登录问题?

See also: 也看看:


FTP

我怎样 FTP?

See also: 也看看:

我怎样使用Filezilla?

See also: 也看看:

我怎样上载文件和文件夹?

See also: 也看看:

我怎样改变文件代码?

See also: 也看看:

MySQL

我真的需要一个 MySQL?

You certainly need the MySQL database server to power your WordPress blog. In fact, WordPress only supports the MySQL database server. Listed are the PHP and MySQL requirements: 你当然需要一个MySQL数据库服务器来为你的WordPress博客供以动力。事实上,WordPress只支持MySQL数据库服务器。所列出的是PHP和MySQL要求:


模板:Server requirements 模板:服务器要求


我能使用除了MySQL外,其它的一个数据库吗?

Other databases are not supported at the moment. 目前不支持其它的数据库。

There are several other excellent database storage engines, such as PostgreSQL and SQLite that WordPress is interested in supporting in the future. Suppporting multiple databases is trickier than it sounds and is not under active development, although there are plenty of architectural discussions about the best approach to take. Approaches for increasing the number of supported databases are discussed at WordPress:Using Alternative Databases. There is a PostgreSQL port of WordPress available called WordPress-Pg. 有几个其它的特别好的数据库存储引擎,像PostgreSQL和SQLite是WordPress在将来感兴趣于支持的。虽然关于采取最好的方法,有许多建筑上的讨论,使用多个数据库比它听起来麻烦,目前也不在积极地发展。关于增加支持的数据库的方法在使用可选择的数据库上讨论.有一个WordPress的PostgreSQL端口,称作WordPress-Pg

WordPress怎样使用MySQL?

MySQL is extremely fast. It is also the most widely available database server in the world. Open-source and free, MySQL is supported by thousands of low-cost Linux (and Windows!) hosts, which means a very low barrier to entry for anyone wanting to start a WordPress (or database-driven) website. MySQL's documentation is useful, cogent and thorough. (Note: it may be intimidating if you are new to all this.) Add to all that the fact that users are able to directly manipulate MySQL with WordPress:phpMyAdmin, developed expressly for that purpose, and it is obvious that MySQL is the best choice. Of course, WordPress insists on the best。 MySQL 非常地快.它也是世界上用的最广的数据库服务器.开放源码,并且是免费的, MySQL由成千上万个低廉的Linux (和Windows!)主机支持,这意味着任何人开始一个WordPress站点(数据库驱动的),只会遇到很小的障碍物. MySQL's 文件是有用的,使人信服而又彻底的.(注:如果你新接触这个,它也许令人胆怯.)加上,用户可以用WordPress:phpMyAdmin直接操作MySQL,就是为这个目的开发的,很明显, MySQL是最好的选择.当然,WordPress坚决要求最好的.


PHP

什么是 phpMyAdmin?

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. phpMyAdmin是用PHP编写的一个工具,目的是处理MySQL在网络上的管理.


See also: 也看看:

我需要知道PHP来使用WordPress吗?

No. The only time you would modify your WordPress blog with PHP would be when integrating some of the plugins. In most cases clear instructions are given within a text file that accompanies the plugin. Other than that, you would not be changing any of the PHP files. 不需要.你唯一一次需要用PHP来修改你的WordPress博客的时候,是结合一些插件的时候.在大多数情况下,伴随着插件的文本文件中有着明确的说明.除了这一点,你就不会改变任何的PHP文件.


See also: 也看看:


Wordpress会在 PHP 安全模式下运行吗?

Most definitely! There are no known issues with any version of WordPress when PHP is running in Safe Mode. 非常明确是的!当PHP在安全模式下运行时,任何版本的WordPress都没有任何已知的问题.


我真的需要 PHP?

You certainly need PHP (version 4.1 or newer) to power your WordPress blog. PHP is the scripting language that drives all of WordPress, and without PHP, your server will not be able to interpret the pages that create your weblog. 你当然需要PHP (4.1版本或者更新的)来给你的WordPress博客供以动力. PHP是一种脚本语言,驱动所有的WordPress,没有PHP,你的服务器就不能够解释那些创建你的博客的网页.


我怎样找出我使用的是哪一个 PHP 版本?

To get information about your server, you can use the phpinfo() function. This will also give you information about your Apache and PHP version and PHP

寻求关于你的服务器的信息,你可以使用phpinfo()功能.这个也会给你提供关于你的ApachePHP版本和PHP的信息.

See also: 也看看:

导入

我怎样从我目前的博客中引入文章,它使用一个不同的博客工具?

See also: 也看看:

我怎样从b2中引进?

See also: 也看看:

我怎样从 Movable Type MT中引进?

See also: 也看看:

怎样从 Blogger中引进?

See also: 也看看:

怎样从Text Pattern中引进?

See also: 也看看:

怎样从一个普通的 RSS Feed中引进?

See also: 也看看

怎样从其它的博客软件中引进?

See also: 也看看:

升级

我拥有的WordPress 是什么版本?

There are several methods to find out what version of WordPress you are using: 有几种方法可以让你明白你正在使用什么版本的WordPress:


  • In your wp-includes folder of your WordPress installation, open the version.php file with any text editor. It will tell you the version number of your installation.
  • 在你的WordPress安装的wp-includes文件夹中,用任何的文字编辑器打开version.php文件.它会告诉你,你安装的版本数字.


  • In the WordPress WordPress:Administration Panels, on any panel look at the bottom of the screen and the version number will be visible.
  • 在WordPress的管理面板上,在屏幕底部的任何面板图标上,会有版本数字.


  • Some Themes include the version number in the footer template. Or you can add it yourself:
  • 有一些主题在页脚模板上有版本数字.

或者你自己可以添加:

<?php bloginfo('version'); ?>
<?php bloginfo('version'); ?>


当我向将WordPress升级为最新的版本的时候,我应该怎样做?

See also: 也看看:

我怎样支持我的数据库?

See also: 也看看:

我怎样恢复我的数据库?

See also: 也看看:

在运行了 upgrade.php后,得到了消息 "看起来你还没有安装 WP. 试着运行 install.php."

After running the WordPress Upgrade, and clicking on the "Have fun . ." link, it says, "It doesn't look like you've installed WP yet. Try running install.php." The problem may be that there is not a user with administrative capabilities.

在运行了[[WordPress:Upgrading WordPress|WordPress 升级],点击一下"玩的开心 . ."链接,它显示"看起来你还没有安装WP. 试着运行 install.php."问题可能在于还没有一个用户有管理能力.


To fix that, use WordPress:phpMyAdmin to manually give a user those capabilities: 解决这个问题,使用phpMyAdmin动手给一个用户这些能力:

  1. First find the ID of the user you want to make administrator by looking in the wp_user table.
  2. wp用户列表中找到一个用户的ID,你想要这个用户成为管理员.
  3. In the wp_usermeta table, for that ID, find the related user_id, and where the meta_key is wp_capabilites, change the meta_value to a:1:{s:13:"administrator";b:1;}.

wp_用户meta 列表,找到相关的user_id,在meta_keywp_capabilites的位置,将meta_value 改为 a:1:{s:13:"administrator";b:1;}.

  1. In that same table, for that user_id, where the meta_key is meta_key change the meta_value to a 10.
  2. 在同一个列表上,对于那个user_id,在meta_keymeta_key的位置,将meta_value改为10.

Please note that the prefix on those tables and those two meta_keys utilize your database prefix. So if your database prefix is mywp_ then the two tables will be mywp_user and mywp_usermeta and the the two meta_keys will be mywp_capabilities and mywp_user_level. 请注意这些列表中的前缀,而且这两个meta_keys使用了你的数据库的前缀.因此如果你的数据库前缀是'mywp__,两个列表就是mywp_usermywp_usermeta,两个meta_keys就是mywp_capabilitiesmywp_user_level.


See also: 也看看:


你怎样迫使一个数据库升级?

Under certain situations, it may be necessary to cause a database to pass through the upgrade process again. To do that, you need to lower the db_version value in the wp_options table that corresponds to the version you want to upgrade from. For instance, if you want to force the datebase upgrade that happens from 2.0.11 to 2.3 you would change your db_version to 3441. To force an upgrade from 2.2, 2.2.1, 2.2.2, or 2.2.3 to 2.3 or 2.3.1, change that value to 5183. 在一些特定情况下,可能有必要促进一个数据库再次经历一次升级过程.那样做,你需要在wp_options表中,降低db_version的数值,使它与你想要哪里升级的版本相符合.比如,如果你想要促使数据库升级从2.0.11开始到2.3,你要将你的db_version改为3441. 促使一次升级从2.2,2.2.1,或者2.3或者2.3.1开始,将数值改为5183.


<pre>
'''db_version''' for WordPress releases:
WordPress发行的'''db_version'''

2.3.2  = 6124
2.3.1  = 6124
2.3    = 6124
2.2.3  = 5183
2.2.x  = 5183
2.2    = 5183
2.1.3  = 4773
2.1.x  = 4773
2.1    = 4772
2.0.11 = 3441
2.0.x  = 3441
2.0    = 3441
1.5.x  = 2541
1.x    = 2540


2.3.2 = 6124 2.3.1 = 6124 2.3 = 6124 2.2.3 = 5183 2.2.x = 5183 2.2 = 5183 2.1.3 = 4773 2.1.x = 4773 2.1 = 4772 2.0.11 = 3441 2.0.x = 3441 2.0 = 3441 1.5.x = 2541 1.x = 2540


Note: Use WordPress:phpMyAdmin to change that value, or use wp-admin/options.php. 注:用phpMyAdmin来改变数值,或者使用wp-admin/options.php

Once the db_version is changed, when logging into your blog a link to upgrade the database will be offered. 一旦 db_version改变了,当登录到你的博客的时候,会提供一个链接来升级你的数据库。