How to Install WordPress – a Step-by-Step Tutorial

There are 7 steps to installing your first WordPress blog:

  1. Get a web host (10 – 30min)
  2. Get a domain name (15min – 1h)
  3. Download WordPress (1min)
  4. Upload WordPress (5 – 15min)
  5. Set up database (5 – 10min)
  6. Install WordPress (2 – 15min)
  7. After installing WordPress (?)

It should take 1 to 2 hours to install WordPress, but it may take longer if you run into issues. With that in mind, let’s get started!

Step 1: Get a web host

A web host is a company that rents their servers to you. You upload your blog’s files onto the web host’s server. When someone visits your blog, they will download the files from the server.

There are several types of web hosting services: shared hosting, VPS hosting, dedicated hosting, and cloud hosting. I wrote a post describing each type of web hosting service and their differences. If you’re a beginner, I recommend getting a shared hosting service from Just Host.

After you get a web hosting service, you will receive credentials to control your server. Shared hosting services all provide a dashboard  for you to set up your website. If you got a VPS, dedicated, or cloud hosting service, you may have to manually set up your server by installing softwares and configuring them. You should also receive the IP address of your server, which you’ll need for step 2.

Step 2: Get a domain name

A domain name is the base of your website’s URL. For example, the domain name of “http://maps.google.com/maps” is “google.com”. You can buy a domain name from a domain name registrar for $1 – $20 per year. I get my domain names from Namecheap.

Your domain name should be recognizable, memorable, and pronounceable. Here are a few rules for choosing a good domain name.

After you buy a domain name, the domain name registrar will give you credentials to control your domain from their website. Log in to their website and find a setting called DNS Records. It should have several rows of inputs, including inputs for record type, host, and record value. Delete all the existing records. Next, add an “A Record” with “@” as the host and your server’s IP address as the value. This tells your browser which server to connect to when someone enters your domain name into their browser’s address bar.

DNS Host Records
Changing your domain’s DNS records

After saving, it should take up to an hour for the changes to take effect. If you go to your website right after saving, it should be blank. Refresh the page every few minutes until you see something else. You can complete the rest of the tutorial while it’s updating.

Step 3: Download WordPress

Go to https://wordpress.org/download/ and download the latest version of WordPress. Extract the files and you should see a bunch of PHP files and 3 folders: wp-admin, wp-content, and wp-includes.

Step 4: Upload WordPress

There are several ways to upload the WordPress files to your server. If you’re using shared hosting, your web host’s dashboard should have a file manager that can upload files. If your web host gave you FTP credentials, you can use a FTP client such as FileZilla to upload the files.

cPanel File Manager
cPanel File Manager

Navigate to a folder called www or public_html. There should be a file called index.php, index.html, default.php, or default.html. This file is the default page that visitors see when they go to your website. Delete this file because we’re replacing it with WordPress. Upload all the WordPress files to the folder.

Step 5: Set up database

Go to your web host’s dashboard and look for phpMyAdmin or MySQL settings. MySQL is a database software that stores your blog’s data. There should be a button to create a new database. You can name it anything you want.

Create MySQL Database
Creating a new MySQL database

After you create your database, you have to create a new database user for your database. WordPress uses the user to connect to your database. Look for a button to add users in the MySQL settings. The username can be anything you want, though I recommend making it the same as your database’s name. If there’s a “host” field, set it to “local”.

Add MySQL User
Adding a new MySQL User

After you add an user, there should be a way to add the newly created user to your database. When you add the user, there should be several checkboxes to add privileges to the user. Add all the privileges to the user for the database. This allows WordPress to have full control over your newly created database, but it can’t access any other databases on your server.

MySQL User Privileges
Giving user privileges for the database

Step 6: Install WordPress

This step uses WordPress’s tool to help you install WordPress. You can also install WordPress manually by editing your wp-config.php file, but the tool makes it easier.

To access the tool, enter your domain name into your browser’s address bar and press “enter”. If you see a blank page, this means the changes from step 2 still aren’t taking effect. You can try entering your server’s IP address into the address bar, but this probably won’t work for shared hosting. This is because many websites are sharing the same IP address, so the server doesn’t know which website to show. You will probably have to wait a few hours for the step 2 changes to take effect.

Once the changes take effect, you should see the “Welcome to WordPress” page. The next step creates your WordPress configuration file (wp-config.php). Enter your database’s name and your database user’s username and password from step 5. Keep the database host and table prefix as the default. If you set up your database correctly, you should see options to set up your blog.

If WordPress cannot automatically create a wp-config.php, you have to create it manually. Go to your web host’s file manager and navigate to the folder containing wp-admin, wp-content, and wp-includes. Create a file here called “wp-config.php” and paste in the code that WordPress provided. Go back to your website and you should see the next step.

Install WordPress page
“Install WordPress” page

The site title can be changed afterwards. The username and password are for your WordPress admin account. Don’t use “admin” as your username because hackers often assume the admin account’s username is “admin”, so that makes it easier to hack. The “Search Engine Visibility” checkbox prevents your blog from appearing on Google, so you should leave it unchecked. After you click “Install WordPress”, your blog is ready to go!

Step 7: After installing WordPress (optional)

After you install and log in to your new blog, the dashboard may seem daunting. Spend at least an hour familiarizing yourself with the dashboard. To write your first post, go to Posts > Add New. You can customize your blog’s design by going to Appearance > Themes. You can customize one of the default themes or download a new one. There are also thousands of plugins to add functionality to your blog. Here is a list of 10 plugins that almost all blogs should have installed.

Installing WordPress is just the beginning. To have a successful blog with lots of visitors, you’ll have to regularly write content and promote your blog. Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *