站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Installing WordPress
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Xxf3325
(
讨论
|
贡献
)
2008年3月22日 (六) 14:58的版本
(新页面: __TOC__ WordPress is well known for its ease of installation. Under most circumstances installing WordPress is a very simple process and takes less than five minutes to complete. The fol...)
(差异) ←上一版本 |
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
__TOC__ WordPress is well known for its ease of installation. Under most circumstances installing WordPress is a very simple process and takes less than five minutes to complete. The following installation guide will help you, whether you go for the ''Famous 5 Minute Installation'', or require the more detailed installation guide. * [[WordPress:#Things to Know Before You Begin|Things to Know Before You Begin Installing WordPress]] * [[WordPress:#Famous 5-Minute Install|The Famous 5-Minute Installation]] * [[WordPress:#Detailed Instructions|Detailed Installation Instructions]] * [[WordPress:#Common_Installation_Problems|Common Installation Problems]] * [[WordPress:WordPress in Your Language]] * [[WordPress:Installing WordPress in Your Language]] * [[WordPress:#Installing_Multiple_Blogs|How to Install Multiple Blogs]] * [[WordPress:#Installing_WordPress_Locally|How to Install WordPress Locally]] * [[WordPress:Getting Started with WordPress|Getting Started with WordPress (much more installation info)]] == WordPress Installed for Free == Before you read much further, if you, for whatever reason, aren't inclined to do this type of software installation on your web server/host, you can still use WordPress by requesting the [http://install4free.wordpress.net WordPress Install4Free] team do the installation for you for free! == Things to Know Before You Begin== Before you begin the install, there are few things you need to have and do. === Things You Need For The Installation === You need access to your site and its directory and software to proceed with the installation. These are: * Access to your [[WordPress:Glossary#Web server|web server]] (via [[WordPress:Glossary#Shell|shell]] or [[WordPress:Glossary#FTP|FTP]]) * A [[WordPress:Glossary#Text editor|text editor]] * An [[WordPress:FTP_Clients|FTP Client]] (if you need to install WordPress on a remote server) * Your web browser of choice ===Things You Need to Do For The Installation=== Begin your installation by: # Checking to ensure that you and your web host has the [http://wordpress.org/about/requirements/ minimum requirements to run WordPress]. # [http://wordpress.org/download/ Download] the latest release of WordPress. # Unzip the downloaded file to a folder on your hard drive. # Print this page out so you have it handy during the installation. == Famous 5-Minute Install == Here's the quick version of the instructions, for those that are already comfortable with performing such installations. More [[WordPress:#Detailed_Instructions|detailed instructions]] follow. # Download and unzip the WordPress package, if you haven't already. # Create a database for WordPress on your web server, as well as a [[WordPress:Glossary#MySQL|MySQL]] user who has all privileges for accessing and modifying it. # Rename the <tt>wp-config-sample.php</tt> file to <tt>wp-config.php</tt>. # Open <tt>wp-config.php</tt> in your favorite [[WordPress:Glossary#Text editor|text editor]] and [[WordPress:#Step_3:_Set_up_wp-config.php|fill in your database details]]. # Place the WordPress files in the desired location on your web server: #* If you want to integrate WordPress into the root of your domain (e.g. <tt><nowiki>http://example.com/</nowiki></tt>), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server. #* If you want to have your WordPress installation in its own subdirectory on your web site (e.g. <tt><nowiki>http://example.com/blog/</nowiki></tt>), rename the directory <tt>wordpress</tt> to the name you'd like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress installation in a subdirectory called "blog", you should rename the directory called "wordpress" to "blog" and upload it to the root directory of your web server.<br><br>'''Hint''': If your FTP transfer is too slow read how to avoid FTPing at : [http://codex.wordpress.org/Installing_WordPress#Step_1:_Download_and_Extract Step 1: Download and Extract]. # Run the WordPress installation script by accessing <tt>wp-admin/install.php</tt> in your favorite web browser. #* If you installed WordPress in the root directory, you should visit: <tt><nowiki>http://example.com/wp-admin/install.php</nowiki></tt> #* If you installed WordPress in its own subdirectory called <tt>blog</tt>, for example, you should visit: <tt><nowiki>http://example.com/blog/wp-admin/install.php</nowiki></tt> That's it! WordPress should now be installed. See also: * [http://www.clearpointsystems.com/ewpi.php Example WordPress installation] * [http://cre8d-design.com/blog/2006/01/19/how-to-install-wordpress-20/ Visual tutorial on how to install Wordpress] * [http://www.optiniche.com/blog/26/installing-wordpress-an-audio-visual-presentation/ Installing WordPress-An Audio-Visual Presentation] * [http://www.wpboy.com/ WordPress Installation Tutorial] == Detailed Instructions == === Step 1: Download and Extract === Download and unzip the WordPress package from http://wordpress.org/download/. * If you will be uploading WordPress to a remote web server, download the WordPress package to your computer with your favorite web browser and unzip the package. * If you have [[WordPress:Glossary#Shell|shell]] access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your [[WordPress:Glossary#Web server|web server]] using <tt>wget</tt> (or <tt>lynx</tt> or another console-based web browser) if you want to avoid [[WordPress:Glossary#FTP|FTPing]]: ** <tt>wget <nowiki>http://wordpress.org/latest.tar.gz</nowiki></tt> ** Then unzip the package using: <br /> <tt>tar -xzvf latest.tar.gz </tt> <br><br>The WordPress package will extract into a folder called <tt>wordpress</tt> in the same directory that you downloaded <tt>latest.tar.gz</tt>. * If you do '''not''' have [[WordPress:Glossary#Shell|shell]] access to your web server, or you are not comfortable using console-based tools, you may wish to deploy WordPress directly to your [[WordPress:Glossary#Web server|web server]] using [http://ftp-unzip.com/ZipDeploy/ ZipDeploy]. === Step 2: Create the Database and a User === If you are using a [[WordPress:Glossary#Hosting provider|hosting provider]], you may already have a WordPress database set up for you, or there may be an automated setup solution to do so. Check your hosting provider's support pages or your [[WordPress:Using cPanel|control panel]] for clues about whether or not you'll need to create one manually. If you determine that you'll need to create one manually, follow the instructions for [[WordPress:WordPress_Backups#Accessing_phpMyAdmin|accessing phpMyAdmin on various servers]], or follow the instructions for [[WordPress:#Using_cPanel|'''Using cPanel''']] or [[WordPress:#Using phpMyAdmin|'''Using phpMyAdmin''']] below. If you are installing WordPress on your own web server, follow the [[WordPress:#Using phpMyAdmin|'''Using phpMyAdmin''']] or [[WordPress:#Using the MySQL Client|'''Using the MySQL Client''']] instructions below to create your WordPress username and database. ==== Using cPanel ==== ''Main article: [[WordPress:Using cPanel]]'' If your hosting provider uses [[WordPress:Glossary#cPanel|cPanel]], you may follow these instructions to create your WordPress username and database. # Log in to your [[WordPress:Glossary#cPanel|cPanel]]. # Click '''MySQL Databases'''. # If a user relating to WordPress does not already exist under the '''Users''' section, create one: ## Chose a username for WordPress ('<tt>wordpress</tt>' is good) and enter it in the '''UserName''' field. ## Choose a difficult-to-guess password (ideally containing a combination of upper- and lower-case letters, numbers, and symbols), and enter it in the '''Password''' field. ## Write down the username and password you chose. ## Click '''Add User'''. # If a database relating to WordPress does not already exist under the '''Databases''' section, create one: ## Choose a name for your WordPress database ('<tt>wordpress</tt>' or '<tt>blog</tt>' are good), enter it in the '''Db''' field, and click '''Add Db'''. # Under '''Databases''', select your WordPress username from the '''User''' dropdown, then select your WordPress database from the '''Db''' dropdown. Make sure '''All''' is checked under '''Privileges''', then click '''Add User to Db'''. # When you return to the main '''MySQL Account Maintenance''' screen, [[WordPress:Glossary#cPanel|cPanel]] will list information about the database you just created. You should see the username you just added to the database (with <tt>ALL PRIVILEGES</tt>), as well as a few sample '''Connection Strings''' for you to use in [[WordPress:Glossary#Perl|Perl]] or [[WordPress:Glossary#PHP|PHP]] scripts to connect to the database. The PHP code will have the following format: $dbh = mysql_connect("''hostname''", "''username''", "<PASSWORD HERE>") or die ("''message''"); mysql_select_db("''databasename''"); : Write down the values of ''hostname'', ''username'', ''databasename'', and the password you chose. (Note that ''hostname'' will usually be '''localhost'''.) ==== Using phpMyAdmin ==== If your web server has [[WordPress:Glossary#phpMyAdmin|phpMyAdmin]] installed, you may follow these instructions to create your WordPress username and database. '''''Note:''' These instructions are written for phpMyAdmin 2.6.0; the phpMyAdmin user interface can vary slightly between versions.'' # If a database relating to WordPress does not already exist in the '''Database''' dropdown on the left, create one: ## Choose a name for your WordPress database ('<tt>wordpress</tt>' or '<tt>blog</tt>' are good), enter it in the '''Create new database''' field, and click '''Create'''. # Click the '''Home''' icon in the upper left to return to the main page, then click '''Privileges'''. If a user relating to WordPress does not already exist in the list of users, create one: ## Click '''Add a new User'''. ## Chose a username for WordPress ('<tt>wordpress</tt>' is good) and enter it in the '''User name''' field. (Be sure '''Use text field:''' is selected from the dropdown.) ## Choose a difficult-to-guess password (ideally containing a combination of upper- and lower-case letters, numbers, and symbols), and enter it in the '''Password''' field. (Be sure '''Use text field:''' is selected from the dropdown.) Re-enter the password in the '''Re-type''' field. ## Write down the username and password you chose. ## Leave all options under '''Global privileges''' at their defaults. ## Click '''Go'''. # Return to the '''Privileges''' screen and click the '''Check privileges''' icon on the user you've just created for WordPress. In the '''Database-specific privileges''' section, select the database you've just created for WordPress under the '''Add privileges to the following database''' dropdown. The page will refresh with privileges for that database. Click '''Check All''' to select all privileges, and click '''Go'''. # On the resulting page, make note of the host name listed after '''Server:''' at the top of the page. (This will usually be '''localhost'''.) ==== Using the MySQL Client ==== If you have [[WordPress:Glossary#Shell|shell]] access to your web server, are comfortable with using the command line, and your MySQL user has the [[WordPress:Glossary#Permissions|permissions]] to create MySQL users and databases, you may follow the example session below to create your WordPress username and database. <pre> $ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" -> IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $ </pre> In the above: * ''adminusername'' will typically be <tt>root</tt>, unless you have another high-privileged account set up. * <tt>wordpress</tt> or <tt>blog</tt> are good values for ''databasename''. * <tt>wordpress</tt> is a good value for ''wordpressusername''. * ''hostname'' will usually be <tt>localhost</tt>. If you don't know what this value should be, check with your system administrator. If you are the system administrator, figure out what this value should be. * ''password'' should be a difficult-to-guess password, ideally containing a combination of upper- and lower-case letters, numbers, and symbols. Write down the values you used for ''databasename'', ''wordpressusername'', ''hostname'', and ''password''. ==== Using Plesk ==== See: [http://www.tamba2.org.uk/wordpress/plesk/ Plesk 7 at tamba2.org] === Step 3: Set up wp-config.php === For the next part, the code you will be looking to change is as follows: <pre>// ** MySQL settings ** // define('DB_NAME', 'putyourdbnamehere'); // The name of the database define('DB_USER', 'usernamehere'); // Your MySQL username define('DB_PASSWORD', 'yourpasswordhere'); // ...and password define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value define('DB_CHARSET', 'utf8'); define('DB_COLLATE', '');</pre> # Returning to where you extracted the WordPress package in '''Step 1''', rename the file <tt>wp-config-sample.php</tt> to <tt>wp-config.php</tt>. # Open the renamed <tt>wp-config.php</tt> file in your favorite [[WordPress:Glossary#Text editor|text editor]] and fill in the following information, per the example above: #; '''DB_NAME''' : The name of the database you created for WordPress in '''Step 2''' . #; '''DB_USER''' : The username you created for WordPress in '''Step 2'''. #; '''DB_PASSWORD''' : The password you chose for the WordPress username in '''Step 2'''. #; '''DB_HOST''' : The hostname you determined in '''Step 2''' (usually <tt>localhost</tt>, but not always. See [[WordPress:Editing_wp-config.php#Possible_DB_HOST_values|some possible DB_HOST values]]). #; '''DB_CHARSET''' : The database character set, normally should not be changed. See ''[[WordPress:Editing wp-config.php]]'' for details. #; '''DB_COLLATE''' : The database collation should normally be left blank. See ''[[WordPress:Editing wp-config.php]]'' for details. # Save the file. *For more extensive details, and step by step instruction for creating the configuration file, refer to ''[[WordPress:Editing wp-config.php]]''. === Step 4: Upload the files === Now you will need to decide where on your web site you'd like your blog to appear: * In the root directory of your web site. (For example, <tt><nowiki>http://example.com/</nowiki></tt>) * In a subdirectory of your web site. (For example, <tt><nowiki>http://example.com/blog/</nowiki></tt>) '''''Note:''' The location of your root web directory in the filesystem on your [[WordPress:Glossary#Web server|web server]] will vary across hosting providers and operating systems. Check with your [[WordPress:Glossary#Hosting provider|hosting provider]] or system administrator if you do not know where this is.'' ==== In the Root Directory ==== * If you need to upload your files to your web server, use your favorite [[WordPress:Glossary#FTP|FTP]] client to upload all the ''contents'' of the <tt>wordpress</tt> directory (but not the directory itself) into the root directory of your web site. * If your files are already on your web server, and you are using [[WordPress:Glossary#Shell|shell]] access to install WordPress, move all of the ''contents'' of the <tt>wordpress</tt> directory (but not the directory itself) into the root directory of your web site. ==== In a Subdirectory ==== * If you need to upload your files to your web server, rename the <tt>wordpress</tt> directory to your desired name, then use your favorite [[WordPress:Glossary#FTP|FTP]] client to upload the directory to your desired location within the root directory of your web site. * If your files are already on your web server, and you are using [[WordPress:Glossary#Shell|shell]] access to install WordPress, move the <tt>wordpress</tt> directory to your desired location within the root directory of your web site, and rename the directory to your desired name. === Step 5: Run the Install Script === Point your favorite web browser to start the installation script. * If you placed the WordPress files in the root directory, you should visit: <tt><nowiki>http://example.com/wp-admin/install.php</nowiki></tt> * If you placed the WordPress files in a subdirectory called <tt>blog</tt>, for example, you should visit: <tt><nowiki>http://example.com/blog/wp-admin/install.php</nowiki></tt> The following screenshots show how the installation progresses. Notice in the screen, Entering the details, you enter your Weblog title and your e-mail address. Also displayed is a check-box asking if you would like your blog to appear in search engines like Google and Technorati. Leave the box checked if you would like your blog to be visible to everyone, including search engines, and uncheck the box if you want to block search engines, but allow normal visitors. Note all this information can be changed later in your [[WordPress:Administration_Panels|Administration Panels]]. <div style="clear:both;height:10px"> '''Version 2.3''' [[WordPress:Image:install23-step0.png|left|thumb|300px|WordPress Version 2.3, Entering details]] [[WordPress:Image:install23-step1.png|left|thumb|300px|WordPress Version 2.3, All done!]] <!-- leaving prior screens for now <div style="clear:both;height:10px"> '''Versions 2.1 and 2.2''' [[WordPress:Image:install21-step0-cropped.png|left|thumb|300px|WordPress Version 2.1/2.2, Getting Started Screen]] [[WordPress:Image:install21-step1-cropped.png|left|thumb|300px|WordPress Version 2.1/2.2, Entering details]] [[WordPress:Image:install21-step2-cropped.png|left|thumb|300px|WordPress Version 2.1/2.2, All done!]] [[WordPress:Image:install-step1.png|left|thumb|Getting Started Screen]] [[WordPress:Image:install-step2.png|left|thumb|Entering details]] [[WordPress:Image:install-step3.png|left|thumb|All done!]] --> </div> <div style="clear:both;height:10px"> </div> ==== Install Script Troubleshooting ==== * If you get an error about the database when you run the install script: ** Go back to [[WordPress:#Step_2:_Create_the_Database_and_a_User|Step 2]] and [[WordPress:#Step_3:_Set_up_wp-config.php|Step 3]], and be sure you got all the correct database information and that it was entered correctly into <tt>wp-config.php</tt>. ** Be sure you granted your WordPress user permission to access your WordPress database in '''Step 3'''. ** Be sure the database server is running. == Common Installation Problems == The following are some of the most common installation problems. For more information and troubleshooting for problems with your WordPress installation, check out [[WordPress:FAQ Installation]] and [[WordPress:FAQ Troubleshooting]]. ; I see lots of <tt>Headers already sent</tt> errors. How do I fix this? : You probably introduced a syntax error in editing <tt>wp-config.php</tt>. :# Download <tt>wp-config.php</tt> (if you don't have [[WordPress:Glossary#Shell|shell]] access). :# Open it in your favorite [[WordPress:Glossary#Text editor|text editor]]. :# Check that the first line contains nothing but <tt><?php</tt>, and that there is '''no''' text before it (not even whitespace). :# Check that the last line contains nothing but <tt>?></tt>, and that there is '''no''' text after it (not even whitespace). :# Save the file, upload it again if necessary, and reload the page in your browser. ; My page comes out gibberish. When I look at the source I see a lot of "<tt><?php ?></tt>" tags. : If the <tt><?php ?></tt> tags are being sent to the browser, it means your [[WordPress:Glossary#PHP|PHP]] is not working properly. All PHP code is supposed to be executed ''before'' the server sends the resulting [[WordPress:Glossary#HTML|HTML]] to your web browser. (That's why it's called a ''pre''processor.) Make sure your web server meets the requirements to run WordPress, that PHP is installed and configured properly, or contact your hosting provider or system administrator for assistance. ; I keep getting an <tt>Error connecting to database</tt> message but I'm sure my configuration is correct. : Try resetting your MySQL password manually. If you have access to MySQL via shell, try issuing: SET PASSWORD FOR '<var>wordpressusername</var>'@'<var>hostname</var>' = OLD_PASSWORD('<var>password</var>'); : If you are using a version of MySQL prior to 4.1, use <tt>PASSWORD</tt> instead of <tt>OLD_PASSWORD</tt>. If you do not have shell access, you should be able to simply enter the above into an SQL query in phpMyAdmin. Failing that, you may need to use your host's control panel to reset the password for your database user. ; My image/MP3 uploads aren't working. : If you use the Rich Text Editor on a blog that's installed in a subdirectory, and drag a newly uploaded image into the editor field, the image may vanish a couple seconds later. This is due to a problem with TinyMCE (the rich text editor) not getting enough information during the drag operation to construct the path to the image or other file correctly. The solution is to NOT drag uploaded images into the editor. Instead, click and hold on the image and select "Send to Editor." == Installation Instructions in Other Languages == For installation instructions in other languages, see [[WordPress:WordPress in Your Language]]. == Installing Multiple Blogs == Detailed information about [[WordPress:Installing Multiple Blogs]] is available. == Installing WordPress Locally == If you have a sufficiently powerful home computer and a sufficiently fast broadband connection, you may want to avoid certain hosting charges by using your own computer as a server. The following tutorials will show you how to setup a server environment and install WordPress on your home computer. * [http://michaeldoig.net/4/installing-mamp-and-wordpress.htm Install WordPress Locally on MacOS X with MAMP (easy)] * [http://maczealots.com/tutorials/wordpress/ Install WordPress Locally on MacOS X (advanced)] * [http://www.tamba2.org.uk/wordpress/xampp/ Install WordPress Locally on Windows XP with XAMPP (easy)] * [http://wojciechbednarski.com/articles/installing-wordpress-locally-on-gentoo-linux Install WordPress Locally on Gentoo Linux (easy)] * [http://sharealike.org/index.php/2007/04/07/multiple-wordpress-blogs-on-a-debian-server/ Install WordPress Locally on Debian Etch using .deb (easiest)] * [http://www.supriyadisw.net/2006/08/wordpress-on-debian-linux Install WordPress Locally on Debian Linux (easy)] * [http://www.supriyadisw.net/2006/12/wordpress-installation-on-ubuntu-with-lamp Install WordPress Locally on Ubuntu Linux with LAMP (easy)] == Resources == *[http://www.lucidgreen.net/wordpressGuides/everymansWPinstall.pdf Brandan Booth's Everyman's WordPress Installation Guide] *[http://www.installity.com/wordpress Vladimir Ghetau's Wordpress Web Installer] *[http://coevolving.com/blogs/index.php/archive/installing-and-customizing-wordpress-on-your-own-domain/ Coevolving Innovations guide for installing on a web host with Fantastico and cPanel] (at Wordpress 2.2.1)
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
模板:WordPress导航
(
查看源代码
)(受保护)