WordPress has long been one of my favorite software projects because of how user friendly their dev team has made using WordPress. Want to install a theme or plugin? No problem! Just search it within your admin area, click the install button, and you are done a few seconds later. Updates are just as easy, which is really (REALLY!) important in today’s world of websites being hacked, defaced, used to send spam, or host phishing content, all the time. Some people still think that installing WordPress is hard, and while it might not be quite as easy as updating WordPress, the process of installing WordPress is really quite easy.
A few notes and assumptions before I get started:
- You have SSH access to your web hosting account. (Not required, but simplifies things. Download the files to your computer, extract, and upload to the sub/addon/domain you create in step 2. Also skip step 3.)
- Your web host is running the cPanel control panel. If not, you will need to “translate” the instructions for the control panel you have. None of this is hard, but things will be located in different places.
- Your hosting account should support WordPress, obviously. PHP, MySQL, Apache (or Apache compatible) web server, you get the idea. The full requirements list for WordPress is found here: http://wordpress.org/about/requirements/ – If your host doesn’t meet this requirements… There are many that do, and there is no reason your host shouldn’t, unless it is some kind of specialty hosting.
- You can download WordPress from their official site: http://wordpress.org/download/. You don’t need to download WordPress yet as it is covered in step 3. There you will also find links to WordPress.com, installation and upgrade instructions, other releases, and so on.
Step 1 – Setup a domain, an add-on domain, sub domain, or sub directory for your blog.
- Domain tools provided by cPanel
If you will be installing WordPress in the “root” of your website, there is nothing to do here. If you’re intending to install on a different domain, or sub domain, you need to create it now. Make note of the path or “Document Root” to this location you have just setup. You will need it in a moment.
The tools offered by cPanel are largely simple and the defaults it provides are fine. Do not to use a “Parked Domain,” however, these simply set the domain you setup to load the content found on your primary domain. “Subdomains” or “Addon Domains” are what you want here.
Step 2 – Setup your database
Use the MySQL Database Wizard instead of the regular MySQL databases tool to make your life easy.
WordPress stores all of its content and many of its settings in a database. Setting up a database and a database user is dead simple with cPanel’s MySQL Database Wizard.
Follow through the instructions and steps cPanel lays out for you.
- First your will name the database. Take note of the prefix it assigns (usually your cPanel account name followed by an underscore).
- Then you will setup a user for this database. This is not the same your cPanel user, nor email accounts, nor FTP accounts. Take note of the username (note the prefix again) and the password you chose. Be sure to pick a very strong password for this.
- The next page will ask you to pick privileges for this user so it can be assigned access to the database. Many people forget this step when not using the wizard. Check the box for all privileges at the top. Hit next step.
- Your done. Save those notes for the next step.
Step 3 – Download and extract WordPress
Time for SSH. On Windows, I suggest PuTTY. On Mac, you can use the built in Terminal.app with the ssh command. It may look scary, but learning to use it will make you much faster at dealing with some common tasks on your site. With some web hosts, you will need to request access to SSH for your account. Also ask them how to connect and what port they use for SSH.
With my host, and using Terminal.app on Mac, it goes like this:
ssh -p PORT MyCPanelUsername@MyDomain.com
You will be prompted to enter your cPanel password, and then you should be in.
On Windows, you will likely be entering your domain, username, and port into PuTTY and then be prompted for a password once it starts to connect.
Hint: Be careful not to enter the wrong password too many times as your server may block you temporarily. If you’re having issues, ask your web host with help connecting to your account via SSH.
Hint 2: If you haven’t connected to your server with SSH before, you will likely get an authenticity fingerprint hash warning. Type yes and hit enter to move on.
Once connected, you will need to change to the document root for the add-on or subdomain you just created. This is done using the ‘cd’ command (no quotes).
Now to download and extract WordPress. As of this writing, the latest version (3.4.1) is available at http://wordpress.org/latest.tar.gz (or http://wordpress.org/latest.zip ). What is nice is that this ‘latest’ archive is always the latest version of WordPress, so you are starting with a fully updated install and aren’t behind the game when you hit the ground. The wget command will let you download this file and save it to the current directory.
Now to extract:
tar xvfz latest.tar.gz
You’re almost done. Hang in there a bit longer. The last command created a new WordPress directory with your WordPress files in it. To avoid looking amateurish, we will move all of those files up a level into our current directory and remove the now empty “wordpress” folder using this command:
mv wordpress/* . && rm -rf wordpress/
I suggest copy/pasting that command to make sure you don’t miss anything like the period before the double ampersands.
Step 4 – Run the WordPress install.php install script.
Fire up your favorite web browser and navigate to the addon/sub/domain you created. Click the button to “Create a Configuration File”
You will see something like this:
Hey! You’ve already got all this stuff ready to go. Awesome!
Click the button and you will be presented with a page asking for your database connection details. Don’t forget the prefix for your database name and database user if your control panel added them. In most cases, the database host should be left at the default (localhost) and the prefix can be left alone too (default: wp_ ). Hit the button. If you have any issues, double check the details you have entered and contact your web host if you still can’t get it to work. If you don’t have issues, it will say that it can communicate with the database, so click the ‘Run the Install’ button to continue installing WordPress.
From here, everything is set how you want. It will set the site title to what you enter, create an admin user with the password you chose. Emails from the site will also come from the email address you enter. The check box “Allow search engines to index this site,” should be left checked, unless, for some reason, you don’t want search engines to list your site. You can change this after the install, so feel free to disable it if you feel the need.
Click more buttons. And… You’re done! Congratulations. Now feel free to use the button to log into your admin area where you can add pages and posts, themes, plugins, change settings, and generally play with your new blog/website.
One last step
Add a comment below and tell me where I can visit your new blog.
Chances are you made a typo and you might need to redo a few steps. If that doesn’t work, you still have a few options:
- Check the “Common Installation Problems” page on the WordPress.org site.
- Contact your web host and see if they can help. Some do, others don’t, many have experience with WordPress.
- Post a comment on this page the problem/error you are seeing and I will help if I can. (Be sure not to post any sensitive details like passwords.)