First and foremost, you’ll need to download WordPress from the official website. When you download it, it’ll be a single .zip file. This file is a “zipped file” and when unzipped contains all the files that are to be uploaded to your website. You can in theory upload these files via the File Manager within cPanel, but using an FTP client is much easier. “FTP” is short for File Transfer Protocol and is a way to transfer files over the network from one computer to another. In this case, from your computer to the server where your website is hosted on. In order to use the file transfer protocol, you need to make use of an FTP client that makes use of the protocol for the transfer of files over the network. There are a variety of applications that do this – the primary ones being FileZilla (Windows, Mac and Linux), Cyberduck (Mac) and CuteFTP (Windows). You can download FileZilla here and Cyberduck here – both free. CuteFTP is a commercial and proprietary FTP client, whereas FileZilla and Cyberduck are both free to use and distribute.
Connecting to your account via an FTP client.
- The “host” or “domain name” is the domain name of your hosting account – such as example.com.
- The username is your cPanel username or the username of an FTP account that you have created (or needed to create) – for example, email@example.com. A default FTP account is set up which is the same as your cPanel username – if you have cPanel hosting – so you can connect to FTP using that. Otherwise, log in to your cPanel account and go to the FTP Accounts section to create a new FTP account. Your FTP account username will be like this: firstname.lastname@example.org.
- In the password field, enter your FTP account password. If you are using the default cPanel FTP account, your password is the same as your cPanel password.
- In the port field, you can leave this blank in most FTP clients, as FTP has a default network port of 21 – most FTP clients would default to port 21 when connecting to a web server over FTP. If not, enter port 21. On all of our shared hosting servers (for shared and reseller hosting customers) the network port for FTP is indeed 21. A network port is to differentiate network traffic and the services that manage that traffic – for example, transferring files over port 21 uses the file transfer protocol.
- Once you are connected to your FTP account, in most FTP clients the left file pane is your local files and the right pane is the server files. In other words, the left pane are the files residing on your computer (and which do not reside on the server) and the right pane are the files and folders that reside on the server – specifically your hosting account on the server. You can drag and drop items from the left pane to the right pane to upload them. In FileZilla, be careful not to drop files from the left pane (or another window) into a folder on the right pane, as it will upload the file(s) you have dragged into that specific folder. If you want to upload files into the current directory in the server pane, make sure you drag-and-drop below any visible folders so it is uploaded in the current working directory.
- If you want to upload files that are not visible via the web, you can upload such files into the root (top) directory (i.e. the / directory). The public_html directory (i.e. /public_html) and the www directory (i.e. /www) are the folders where publicly-visible files are uploaded and stored. For example, if you access http://www.example.com, the default file (usually index.html, index.php) will be sent back to the user trying to visit the website. The index.html or index.php file is located in the public_html folder. You may be wondering why there is also a “www” folder. The answer is – there isn’t. This folder is simply an ordiary file that is called a symbolic link – it’s identical to a “bookmark” that redirects you somewhere. In this case, the www bookmark/symbolic link “redirects” you to the public_html folder. Uploading files to the www folder is the same as uploading files into the public_html folder.
Upload the WordPress files to your website.
In Windows Vista, Windows 7, Windows 8, OS X and Linux, you can simply open the zipped file in order to “unzip” it. On Windows XP, there should be a built-in extraction utility to “unzip” the files by simply opening the zip file itself, however you can also use a third-party unzipping tool such as WinZip in order to do this too. “Unzipping” simply extracts the files that you will upload to your website – i.e. the WordPress files.
When you have extracted the files, you’ll see a lot of separate files and folders – most of which need to be uploaded to your website. However, how you upload them depends on where you want your WordPress installation to be. For example, if you want it on a separate subdomain (i.e. blog.example.com) or on a separate subdirectory (i.e. example.com/blog), the way you upload it will be slightly different. If you want it on a separate subdomain, you first need to create a subdomain within cPanel, which also creates its own separate folder within the public_html directory of your website. Any files within that specific folder will be for the subdomain it has been assigned for. Simply create a subdomain within cPanel. The “Document Root” section is referring to what the folder shall be for the subdomain.
Once you’ve done this, the folder will be viewable via your FTP client. If you are already connected to your FTP account, simply refresh the server pane to view any updated files and folders (and in this case, the newly-created folder for the subdomain). Simply click on the server pane section and press F5 to refresh the pane.
If you want to create a separate subdirectory/folder for the blog (i.e. example.com/blog), simply right-click in the server pane and create a new directory/folder there. In either scenario, you need to upload the WordPress files into that separate folder, unless you want your WordPress installation to be your entire website – i.e. example.com instead of example.com/blog.
You can either find the files you’ve extracted from the zip file within the left-side local pane (if the FTP client of your choosing has this), or use the file manager on Windows, Mac, Linux or whichever operating system you’re using to find and drag and drop the necessary WordPress files to be uploaded. If you have a local pane in the FTP client, click on it and select Ctrl + A to select all files (Cmd + A on a Mac) and then drag them onto the server pane. There are a few redundant files you would have uploaded if you had selected them all and not manually deselected a few that are not necessary to upload. These files are:
Simply delete these files once the upload has finished. You can select them manually and delete them together by selecting each file using the Ctrl key (or the Cmd key on a Mac). Once both are selected, just delete them as normal.
Proceeding with installation.
To install WordPress, go to the area of your site where you uploaded your WordPress files. If you had uploaded your WordPress files to your root directory (i.e. not a separate subdirectory), simply access your website to be prompted with the installation wizard for WordPress; otherwise, go to the specific area of your website via your web browser to proceed with the installation wizard – whether that’s blog.example.com or example.com/blog.
You may first be prompted to create a wp-config.php file. This will contain the automatically-generated configuration information that WordPress will make use of. If necessary, it will provide you with the option to allow WordPress to create the configuration file for you, but this may not work in certain server environments. There’s no harm in trying – so select the Create a Configuration File if prompted to do so. If it doesn’t work, you’ll need to create a file titled wp-config.php in the area where all the WordPress files reside (i.e. in the root directory or the blog directory – wherever you uploaded the WordPress files to). Some FTP clients do not have any function to be able to create files – only upload them. In which case, you need to create the blank file separately in a text editor of your choice (such as Notepad on Windows, if you do not have a separate text editor installed), save it to the Documents folder and then upload it via your FTP client. Of course, you can also create the file within the web-based File Manager in cPanel.
If all goes well, you’ll be greeted with a “Welcome to WordPress. [..]” screen, with preliminary information you’ll need to know. You’ll likely not know what the database username, password and host is at this point – and luckily, we’re getting at this right now.
In order for you to be able to write posts via WordPress and have separate accounts via your WordPress blog, it needs to be stored somewhere. The most robust solution is by using a database system such as MySQL. You can easily create MySQL databases within the cPanel control panel. Simply go over to the MySQL Databases section and create a new database. Once you’ve created a database, go ahead and create a database user (further down on the “MySQL Databases” page) and specify a strong password for it too. Once you’ve done this, you need to add the database user to the actual database. Scroll down to the Add User to Database section and select the user and database in both dropdowns. On the next screen, you’ll be prompted to specify the privileges that the user will have on the database – check the ALL PRIVILEGES option. Once this is done, go back to the WordPress installation wizard and select the Let’s go! button.
- Database Name: This will be the actual database you created, not the database user. You need to specify the username of your cPanel account and the name of the database itself, like this: cpusername_dbname. For example, if your cPanel username is example and your database name is blog, you’d enter in the field example_blog.
- User Name: This is the database user you created. Again, if your cPanel username is example and the database user is bloguser, you’d enter example_bloguser.
- Password: The password of your database user that you entered when creating it via the MySQL Databases function in cPanel.
- Database Host: A default option localhost is provided – this should be fine. The “Database Host” usually needs to be changed if the database is hosted externally on another server. However, because the database is hosted on the same server, localhost returns the IP address of the server with which the WordPress application is running from – and subsequently, your database being hosted on the same server.
- Table Prefix: This can be left as-is. This is in case you want to run multiple WordPress installations from a single database. A “table prefix” is to make sure that each table in the database for each WordPress installation is given a unique name (since it’ll have a prefix on each table name) – could save having multiple databases for multiple WordPress installs.
- Once all is done, click the Submit button. You’ll be prompted if everything goes OK. If it does, click Run the install.
- At this point, you need to enter a Site Name, Username (for your blog account), Password (for your blog account), Your E-mail (for your blog account). You can leave Privacy as-is unless you do not want search engines to visit your blog and index it in search results (i.e. make your blog available on search engines like Google and Bing).
- Installation finished! Your WordPress administrative panel is always located at /wp-admin. To login, simply point your web browser to example.com/wp-admin.