Skip to main content

Installing WordPress « WordPress Codex

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Bookmark History

Saved by 74 people (-28 private), first by anonymouse user on 2006-03-02


Public Sticky notes

  • Download and unzip the WordPress package, if you haven't already.
  • Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
  • Rename the wp-config-sample.php file to wp-config.php.
  • Open wp-config.php in your favorite text editor and 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. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.
  • Highlighted by marketto

    Run the WordPress installation script by accessing wp-admin/install.php in your favorite web browser.
    • If you installed WordPress in the root directory, you should visit: http://example.com/wp-admin/install.php

    Highlighted by marketto

    If you are using a 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 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 accessing phpMyAdmin on various servers, or follow the instructions for Using cPanel or Using phpMyAdmin below.

    Highlighted by marketto

    Step 3: Set up wp-config.php

    For the next part, the code you will be looking to change is as follows:

    // ** MySQL settings ** //
    define('DB_NAME', 'wordpress');     // The name of the database
    define('DB_USER', 'username');     // Your MySQL username
    define('DB_PASSWORD', 'password'); // ...and password
    define('DB_HOST', 'localhost');     // 99% chance you won't need to change this value
    1. Returning to where you extracted the WordPress package in Step 1, rename the file wp-config-sample.php to wp-config.php.
    2. Open the renamed wp-config.php file in your favorite 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 localhost, but not always).
    3. Save the file.

    Highlighted by marketto

    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, http://example.com/)

    Highlighted by marketto

    In the Root Directory

    • If you need to upload your files to your web server, use your favorite FTP client to upload all the contents of the wordpress directory (but not the directory itself) into the root directory of your web site.

    Highlighted by marketto

    Step 5: Run the Install Script

    Using your favorite web browser, visit wp-admin/install.php within the directory into which you just installed WordPress on your web site.

    Highlighted by marketto

    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.

    Highlighted by marketto

    f you installed into the root directory of your web site, you would visit http://example.com/wp-admin/install.php.

    Highlighted by marketto

    Run the WordPress installation script by accessing wp-admin/install.php

    Highlighted by thenose

    If you do not have shell access to your web server, or you are not comfortable using console-based tools, you may wish to deploy WordPress directly to your web server using ZipDeploy.

    Highlighted by thenose

    If you have shell access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your web server using wget (or lynx or another console-based web browser) if you want to avoid FTPing:
    • wget http://wordpress.org/latest.tar.gz
    • Then unzip the package using:
      tar -xzvf latest.tar.gz

    Highlighted by jruckman

    Using phpMyAdmin

    If your web server has 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.

    1. If a database relating to WordPress does not already exist in the Database dropdown on the left, create one:
      1. Choose a name for your WordPress database ('wordpress' or 'blog' are good), enter it in the Create new database field, and click Create.
    2. 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:
      1. Click Add a new User.
      2. Chose a username for WordPress ('wordpress' is good) and enter it in the User name field. (Be sure Use text field: is selected from the dropdown.)
      3. 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.
      4. Write down the username and password you chose.
      5. Leave all options under Global privileges at their defaults.
      6. Click Go.
    3. 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.
    4. On the resulting page, make note of the host name listed after Server: at the top of the page. (This will usually be localhost.)

    Highlighted by haleonearth

    Highlighted by mindyourtime

    Using the MySQL Client

    If you have shell access to your web server, are comfortable with using the command line, and your MySQL user has the permissions to create MySQL users and databases, you may follow the example session below to create your WordPress username and database.

    $ 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
    $ 
    

    In the above:

    • adminusername will typically be root, unless you have another high-privileged account set up.
    • wordpress or blog are good values for databasename.
    • wordpress is a good value for wordpressusername.
    • hostname will usually be localhost. 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.

    Highlighted by jmspiers