How to Install WordPress With cPanel and MySQL Database

in WordPress Tutorials

In my last tutorial I talked about using Fantastico to install WordPress. While this is a quick way to get the software up and running, it’s not an option for those whose host doesn’t have the Fantastico script installer. So this week we’ll look at how to do WordPress’ famous “five minute install,” though I recommend allowing yourself a little more time than that to complete it. Here are the steps to follow:

Step 1: Get WordPress – Just go to and click the download button for zip files, which will take up 4.7 MB of space on your hard drive in their current form (version 3.4.2). You can also download the software in the tar.gz format, but this is rarely done and I don’t recommend it.

Step 2: Unzip the files – You’ll need an unzipping app to do this if you don’t already have one. I recommend WinZip, which you can download at

Step 3: Create a MySQL database – cPanel is the most popular way of doing this, so that’s the interface I’ll walk through here. Most hosting services now have cPanel. If you haven’t chosen your host yet, then I strongly recommend only using one that has this feature.

  • Log into your hosting account, open cPanel, and then choose the MySQL database option.
  • Give your database a name. I recommend something simple and easy to remember. Just calling it ‘wordpress” works fine, but use whatever you like. Then click the “create database” button. A message will appear when this is completed.
  • Go back to the MySQL database page. To do this, simply use your browser’s back button.
  • Now you’ll create your username and password. I’ll skip the usual lecture about making sure you choose a secure password. But I will stress the importance of writing both it and the username down, along with the name you chose for your database, and sticking this information someplace where it won’t be lost. This can save you hours of stress and self-criticism later. Then use your browser’s back button to return to the main screen. There’s also a link on the page that will do this.
  • Go to the “add users to database” page, select the username you created from the dropdown list, along with the name of the database you created earlier.
  • You’ll now be looking at the MySQL maintenance screen, from where you can manage user privileges. Go ahead and give yourself all privileges, since you’re the administrator. You’ll get a message telling you that you’ve been added to the database.

Step 4: Upload the files you unzipped in step 2 – To do this, open the folder where the downloaded files are. Connect to your server with your FTP client and upload the files into your hosting account’s root directory.

What to do if You Don’t Know What Your Root Directory is

Ask your host. The answer will vary, depending on how it sets up its files.

Step 5: Run the Install Script – This step isn’t brain surgery, but it does involve entering the exact information as outlined in the following steps.

  • In your Internet browser’s address bar, type in this URL: – where “your domain” is just that: the domain name you purchased. Hit your enter button.
  • You’ll see a message telling you that WordPress can’t find a wp-config.php file. You’ll also see button which will allow you to create one. Click it. This will bring you to a page that says “welcome to WordPress” with a button at the bottom that says ”let’s go.” Click it.
  • Now you’ll need the database name, username, and password you wrote down earlier. Enter your database name in the appropriate screen, along with the username and password. You’ll see the word “localhost” listed in the database. Leave this just as it is. You’ll also see “wp_” in the table prefix field; leave this untouched as well. Then click the submit button.
  • At this point you should see a button appear at the bottom of the screen that says “run the install.” If you do, then click it. If you don’t, then the most likely cause is that your host requires a slightly different configuration for your database name. Return to the screen where you entered your username and password, and for the database name field, enter “YOUR USERNAME_wordpress.” For example, if your username is “joewhite,” you would type in “joewhite_wordpress.”
    Then click the submit button again.
  • It’s at this point that you will finally reach WordPress’ “five-minute install” screen (see why I advised you to allow yourself more time?). Enter the title you want for your site, your username, your password in both the fields that ask for it, and your e-mail. You’ll also see a checked box that allows Google and other search engines to see your site. Leave this checked unless you don’t want anyone else to find it. Click the install button. In a few minutes you’ll get an e-mail telling you how to log into your site going forward.

Success! You have set up your WordPress account and are ready to begin building your home on the Internet. We’ll discuss how to do just that in upcoming posts.

Common Install Issues and How to Resolve Them

Occasionally, you might see one of these messages pop up during the install process:

Error connecting to the database – This occurs when the database name, username, password, and/or host was typed in incorrectly. Reenter them at the MySQL database screen.

404: page not found – This is seen when the URL you used to get into the log-in page differs from the location of your actual installation. Double-check it and try once more.

403: forbidden access – You will see this if the extension on one of your web server’s WordPress install files ends in something other than .php. Open the folder and delete any files that end in index.htm, index, or html.

As always, feel free to post a message with any questions or comments. See you next time.