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.
Before 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.
Create A Subdomain in cPanel
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.
After 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
Now 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.
Hit 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.
Now 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.
On the next screen, select All Privileges and then click on the Make Changes button.
Now that your database is setup, its time to click on the Home button again and begin the actual WordPress install.
Now 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.
Click 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 .
Now that you’re back to the File Manager screen, click on wordpress.zip once to highlight it.
After 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.
Now, 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.
Inside 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.
Now, 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).
All 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.
Scroll 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.
The 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.
You are now done with the cPanel portion of your WordPress installation! Navigate over to your subdomain and finish off your WordPress install.
Click Install WordPress after filling in your desired information.