Installing WordPress can seem a daunting task for beginners, but it really isn´t all that difficult. This tutorial will guide you through the process of setting up your WordPress site in four quick and easy steps. By following this guide you´ll not only learn how to install WordPress on your server, but you´ll also understand a little bit more about how WordPress works. Let´s get started!
Tools of the trade
During the set up we´ll use a few tools. Some of these are probably already installed on your computer. Have a look and download what´s missing. This is what you need:
- Text editor – We´ll use a simple text editor to make notes, temporarily save passwords and usernames and edit WordPress files. Don´t use MS Word for this, as this program adds all kinds of invisible markup to your text. We strongly recommend you to use Notepad++ if you´re on Windows. If you´re on a Mac, have a look at TextWrangler. Both programs are 100% free.
- FTP Client – An FTP Client is a small prgram that allows you to upload files to your server. We recommend the free open source program FileZilla.
- Server login details – You´re hosting provider probably sent you an email with all logind etails for your account. We´ll need the login details for the FTP server and the ones for the control panel (cPanel, Plesk or DirectAdmin for example).
- Password Tools (Optional) – To prevent your blog from being hacked, secure passwords are essential. Don´t use dictionary words, not even combined with letters or numbers. Choose a random string of lettes, numbers and symbols instead. Here´s a password generator you can use. After installing WordPress, you´ll want to store your passwords in a save place. Lastpass is a useful browser plugin that will automatically log you in to the sites you want.
Step 1: Preparation
We´ll start with creating a new folder on our computer where we´ll save all notes, documents and folders that we´ll use during the installation process. I usually create the folder on my desktop and call it wordpress_install. When done, open your text editor and create a new document. Save this as passwords.txt in your newly created folder.
Head over to WordPress.org and download the latest release. When done, unzip the file and save it in the wordpress_install folder. You´ll end up with this:
When we´re finished, simply delete this folder, but don´t forget to store your passwords first!
Step 2: Create the WordPress database
If you´ve never worked with servers, you´re probably not familar with the concept of databases. Don´t worry, it´s really simple to understand. Just think of a database as an Excel spreadsheet, with rows and columns. Within the spreadsheets there are also different worksheets. A database is pretty much the same.
WordPress uses this database to save all your posts, pages, uploads and personal settings. For security reasons WordPress can´t create the database itself, so we´ll have to do it. When done we´ll give the username and password to WordPress.
Databases come in different colors and flavours. WordPress uses a MySQL database.
The general process for creating a WordPress database is pretty similar on different control panels, although the exact steps may be slightly different.
- Login to your control panel with the login details your hosting provider sent you
- Find the “Create a database” link (other possible names: MySQL Database Wizard or MySQL Manager.)
- Create a database
- Create a database user and password
- Add the user to the database
Copy the database name, user and password to the password.txt file.
Step 3: Edit wp-config.php
Now that our database is set up, we should pass the login details to WordPress. We´ll also configure some additional WordPress settings. Start by opening the file wp-config-sample.php that you´ll find in the WordPress folder.
- Add your database name, database user and password on the following lines:
- Go to the WordPress secret key service and replace the secret keys in the wp-config-sample.php file with the keys on this page.
- In the config file, look up the entry
$table_prefix = 'wp_';
Add a few random numbers and letters after the
prefix and end with an underscore. Example:
$table_prefix = 'wp_1a2b34_';
(Do not copy this example!)
- Close the wp-config-sample.php file and rename it to wp-config.php
Step 4: Upload and install WordPress
Now that we´ve created a database and provided WordPress with the login details, it´s time to upload all our WordPress files to our server.
- Open FileZilla and connect to your server with the username and password your hosting provider sent you.
- Copy all the contents of the wordpress folder to the public_html folder on your server (or if you want to install wordpress in a subdirectory copy them to that folder).
- Go to http://www.example.com/wp-admin/install.php (replace example.com with your domain) and fill in the site title, username and password. For security reasons it´s better not to use the default “admin” username. Any alternative is fine. Generate a long, random password and note it down in your password.txt file