分类: 系统运维
2009-03-13 17:55:04
Download and unzip the WordPress package from .
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 access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your using wget (or lynx or another console-based web browser) if you want to avoid :
wget
Then unzip the package using:
tar -xzvf latest.tar.gz
The WordPress package will extract into a folder called wordpress in the same directory that you downloaded latest.tar.gz.
If you do not have access to your web server, or you are not comfortable using console-based tools, you may wish to deploy WordPress directly to your using .
You can create MySQL users and databases quickly and easily by running mysql from the shell. The syntax is shown below and the dollar sign is the command prompt:
$ 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 $Step 3: Set up wp-config.php
For the next part, following the instructions in as a guide to generating and using your secret key password you will need in the following section for WordPress 2.7 versions and above.
The code you will be looking to change is as follows:
// ** 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', ''); // Change SECRET_KEY to a unique phrase. You won't have to remember it later, // so make it long and complicated. You can visit // to get a phrase generated for you, or just make something up. define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
- Returning to where you extracted the WordPress package in Step 1, rename the file wp-config-sample.php to wp-config.php.
- Open the renamed wp-config.php file in your favorite 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 localhost, but not always. See ).
- DB_CHARSET
- The database character set, normally should not be changed. See for details.
- DB_COLLATE
- The database collation should normally be left blank. See for details.
- Save the file.
For information on enabling SSL in WordPress 2.6, see .
Point your favorite web browser to start the installation script.
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 .