Setup A WordPress Installation On A Subdomain With cPanel

If this blog post helped you in some way, please leave a comment letting me know. Thanks!

Today we are going to walkthrough the setup and installation of a WordPress install on a subdomain using the cPanel server software.

download wordpressBefore you begin your setup in cPanel, you’re going to want to go to http://wordpress.org and download the latest version of WordPress. Leave it compressed as a .zip file – we’re going to get to this later in the guide.

Login to cPanel

Go to http://domain.com/cpanel and enter in your username and password.
login to cpanel

Create A Subdomain in cPanel

cpanel subdomains

Some cPanel installs are different, so scroll down the list of icons until you find one that says Subdomains. Go ahead and click it.

 

Next, you’ll encounter a screen that looks very similar to this one. Fill in the subdomain field. For my subdomain, I’m going to use “waynesworld” – leave Document Root blank and his the Create button.

create subdomain cpanelcpanel homeAfter hitting create, you’ll find yourself at a screen confirming the name and a back button. Ignore the back button and click on the Home button on the top left corner of the screen.

Setting Up Your Database in cPanel

mysql databases cpanelNow that you’re back at the home screen with all of the icons, find the icon that reads MySQL Databases. Click on this icon to begin your database setup.

 

Enter in the name of your database into the Create New Database field. Note, your database name will start with the login to your cPanel installation. In this picture, I have it blanked out, but you will see your login name and an underscore on your screen – example_databasename – hit Create Database after you’ve entered in the name.

create new database cpanelHit the Go Back button to begin setup of your MySQL user. Enter in your username and a password, then click on Create User. Make sure you’ve written down your database name, database username, and password. Remember, its the full name, cpanellogin_databasename – otherwise it won’t work.

add user to database cpanelNow that you’re user is created, hit the Go Back button. Scroll down to the bottom of the page. Now, we’re going to add the user to the database. From the user drop-down, select the user you just created. Do the same for the database drop-down.

add user to database cpanelOn the next screen, select All Privileges and then click on the Make Changes button.

 

all privileges cpanelcpanel homeNow that your database is setup, its time to click on the Home button again and begin the actual WordPress install.

Installing WordPress

file manager cpanelNow that you’re back to the list of icons on the main cPanel screen, look for the one that says File Manager. A mini-window will popup asking you to make a selection. Click on the button next to Document Root and make sure your subdomain is selected. Also, make sure the box next to Show Hidden Files is checked. Hit Go. The File Manager will open in a new window.

file manager selection cpanelupload file manager cpanelClick on the Upload button in the File Manager toolbar and navigate to the location where you saved wordpress.zip – if you didn’t download this yet, go ahead and do it now. As soon as you select your wordpress.zip file it will begin uploading. When it is finished, your screen will show it as complete and you can click the link to go Back .

upload files cpanelNow that you’re back to the File Manager screen, click on wordpress.zip once to highlight it.

select file

extract file manager cpanelAfter the zip file is selected, click on the Extract button on your File Manager toolbar.

 

A miniwindow will popup. Click Extract Files. After the files are extracted, hit the Close button on the mini-window.

extract files cpanelNow, you will see a folder has appeared inside of the file manager titled wordpress. Double click on the folder icon next to wordpress to open the folder.

select all file manager cpanelInside of the wordpress folder, you will see a list of all the files extracted from wordpress.zip. Click on the Select All icon on the File Manager toolbar. All of the files will now be highlighted blue.

move file cpanelNow, click on the Move File button on the File Manager toolbar.

 

At the mini-screen that pops up, there is a text field near the bottom. Delete the part that reads “/wordpress” similar to what is shown below. Then, click on Move File(s).

move files cpanel

up one level file manager cpanelAll the files should disappear from your screen. Click on the button on the File Manager toolbar that says Up One Level. You will see all your files in the subdomain’s root directory.

rename file cpanelScroll down to wp-config-sample-.php and double click on the filename. Delete “-sample” so the filename reads wp-config.php – hit the enter key on your keyboard when you’re done.

code editor file manager cpanelThe file will unhighlight itself, so go ahead and click it again once. Then, click on Code Editor on the File Manager toolbar. On the mini-window, it is safe to ignore the options and click Edit.

Now that you are in the code editor for wp-config, go ahead and fill in the database name, username, and password you created earlier. You’ll also want to fill in the salt info on lines 45-52. Line 62 is where you can change the table prefix if you are performing a more advanced installation. Click Save Changed when you are done.

code editor file manager cpanel

You are now done with the cPanel portion of your WordPress installation! Navigate over to your subdomain and finish off your WordPress install.

one step wordpress installClick Install WordPress after filling in your desired information.

final step installation wordpressCongratulations! You have successfully installed WordPress on a subdomain with cPanel!

, , , , , ,

4 Responses to Setup A WordPress Installation On A Subdomain With cPanel

  1. Michelle July 23, 2011 at 5:37 pm #

    This was incredibly useful. Thank you so much for taking the time to do this. I never would have figured it out on my own.

    • Mike September 3, 2011 at 10:56 am #

      Thank you, glad to have helped!

  2. Andrew Tonks August 2, 2012 at 6:30 am #

    thank you so much for doing this, been a big help and save me the £100 my Web Developer wanted to do this for me!!

    Andrew

  3. Che Pacial August 29, 2012 at 6:33 pm #

    yay!! thank you sooo much! i’ve been looking for this lately because i’m trying to teach myself wordpress :)

Leave a Reply