Wordpress installation and configuration
Please, also read Installing Wordpress. It's fine enough. I only created this article in order to have a shorter piece I could use with a projector in a web applications class - Daniel K. Schneider 16:31, 19 January 2010 (UTC).
Installation
Creating a database
WP needs a MySQL database. The installation procedure will create many tables that should normally sit in their own database.
In practice, you have several situations.
(1) If you have a cheap or free provider or if you have a student account, you only may have access to single database. This means that WP will have to co-exist with other applications. That is not a big problem, since most applications add a prefix to each table. By default, WP will add a 'wp_' prefix to each table.
(2) If you want to install WP with a "normal" shared webhosting provider, then you likely may use several databases. Consult the admin interface. Usually there is a tool that allows you to manage databases, e.g. add users and tune permission.
(3) If you have your own MySQL server, then you should install WP in its own database that you'll have to create, i.e.
- Create a database user (that WP will then use to connect to the database)
- Create a database that database user can access and fill up with table (and later, data)
In both cases you must create and/or remember:
- The name of the database
- The name of the database user
- The password of the database user
- Creating a database and database user with phpMyAdmin
PhpMyAdmin is a popular database management system that is installed with most providers. You may create a new database and user in different orders. The most easiest way is to use the following procedure:
(1) Click on the Privileges tab on the top horizontal menu
(2) Click on Add User at the bottom
- Then choose a user name, e.g. 'blog'
- Then select host=local or type localhost
- Enter the password twice (and remember it)
- Important: Tick Create database with same name and grant all privileges (this will create a new database)
- Crucial: Never grant any global privileges on a production server. Each database should have its own life (and hacking attacks).
If you do it right you'll have
- database name = blog
- database user name = blog
- password = rumpelstilskin
Base installation
- Download and put code in place
- Download unzip the WordPress package from http://wordpress.org/download/.
- Create a directory somewhere and call it junk
- Dezip the package within the junk directory. You will see a directory called wordpress
- If you wish to have a different URL on your server, e.g. http://xxxx/blog, then rename the wordpress directory.
- Transfer this directory to the web server tree, e.g. via FTP to a provider, to a local "www" directory or somewhere on your local area network.
- Edit the configuration file
(1) Rename the wp-config-sample.php file to wp-config.php. Make sure to get it right !
(2) Edit this file (wp-config.php) in a text editor. Do not use Word or Notepad. Enter information below and adapt to database name and database user name that you just defined above.
Base information:
Security (you may skip this step if you test drive WP on a local server on your PC)
In order to make cracking more difficult your wordpress will add extra characters to user's cookies, making it harder to crack encrypted passwords. You only need to do this once and you don't need to type these ever. So use the online generator to generate this salt. Good examples
define('AUTH_KEY', ':dr+%/5V4sAUG-gg%aS*v;&xGhd%{YKC^Z7KKGh j>k[.Nf$y7iGKdJ3c*[Kr5Bg'); define('SECURE_AUTH_KEY', 'TufWOuA _.t>#+hA?^|3RfGTm>@*+S=8\"\4+\"}]<m#+}V)p:Qi?jXLq,<h\\`39m_('); define('LOGGED_IN_KEY', 'S~AACm4h1;T^\"qW3_8Zv!Ji=y|)~5i63JI |Al[(<YS<2V^$T])=8Xh2a:b:}U_E'); define('NONCE_KEY', 'k1+EOc-&w?hG8j84>6L9v\"6C89NH?ui{*3\\(t09mumL/fFP_!K$JCEkLuy ={x{0');
Watch out: These keys must be enclosed in quotes ' .... '. Do not use quotes inside the keys, or php will be confused.