beanz Magazine

Create a WordPress Website

Learn how to configure, install, and set up your own WordPress website.

In earlier issues, I described two different ways to create a website, from the simplest set of HTML pages on your computer to using an online service like Wix.com or Squarespace.com. This article describes how to build a website the way most websites are built: setting up a web hosting account, installing a publishing tool, and creating your site.

The process is what web designers and producers do when they set up a client site or their own sites. While there are a lot of steps, all the steps can be learned easily. Plus you remember steps which makes the work go faster each time. This project takes up to an hour. Time depends on what you already have, for example, a domain name.

I’d also note, while this article uses WordPress as a publishing tool, the steps apply to any publishing software. Drupal and Joomla are two other options. There are a number of other publishing software tool projects.

Prerequisites

You’ll need these items to create a WordPress website:

  • Download latest WordPress software from http://www.wordpress.org/download.
  • A web hosting account, for example, from Lunarpages.com. The hosting account should include CPanel or similar online web tool to create and manage MySQL databases. You’ll want an account with PHP language support and MySQL databases.
  • FTP (file transfer protocol) software used to upload your WordPress files to your web hosting account. Filezilla is open source and free at http://filezilla.com.
  • Access to your domain name registrar so you can update the internet domain name servers to point your domain to your web hosting account.
  • Access to your web hosting control panel and MySQL control panel.

Considerations

First, while much of the technology may be unfamiliar to you, as you’ll see there are easy ways to get work done without having to know all the technical details or terminology. Do you have to know how FTP or MySQL works? No. The more you do, the more you learn. But you can follow these steps as a complete newbie if you’re willing to learn and have a little patience.

While a web hosting account costs money, it is possible to set up an account for $8-15 per month and cancel when you finish the project or do not need the WordPress site. I've used Lunarpages for years with few problems. There are other options, as well.

While some web hosting companies include the ability to click a button and install WordPress, this tutorial shows the complete hands on installation process. It shows how software is bundled and put into production use. You also can set up a WordPress site at WordPress.com but the same reasoning applies: this tutorial shows how software is packaged, downloaded, then deployed.

When you set up a web hosting account, you receive an email with your account username and password, IP address assigned to your web site (used to route traffic to your site), the hosting company domain name servers (DNS) used to route traffic to your site, and a link to your web hosting control panel. The control panel also includes a link to a control panel for the MySQL database WordPress will use and a way to create MySQL user accounts and databases.

WordPress installs itself in whatever folder you use on a web server. If you install the files in the root folder of your site, the URL to your site will be your domain name. If you install WordPress in a sub-folder off the root folder of your site, for example, a folder called blog, the URL to your WordPress site will be yourdomain.com/blog.

If you have a Mac, or use a computer with a web server pre-installed, you can install WordPress on your computer. I've linked to a few tutorials at the bottom of this article.

Finally, because there are a number of services and tools to work with in this article, if you encounter problems be sure to contact the appropriate service or support community. For example, ask your domain registrar how to update your DNS information if you have problems. Or if you have a problem installing WordPress, use their online forums to search for an answer (and post your question if you don’t see it already answered).

Procedures

Are you ready? We’ll follow these steps to upload your publishing software to your web hosting account:

  1. Set up the MySQL database and create a user account for the WordPress publishing software.
  2. Update the WordPress configuration file with the MySQL user account information.
  3. Use FTP software to connect to your web hosting account and upload your files.
  4. Update your domain name to route traffic to your WordPress site.
  5. Use your web browser to install WordPress.
  6. Customize your WordPress site.

Set Up the MySQL Database

When you set up a new web hosting account, you receive an email with your account details. This email should include a link to a control panel, an online service where you can manage details about your hosting account. This includes the ability to set up databases, configure email accounts, and other mundane tasks.

To set up your MySQL database:

  1. Open up your control panel in a web browser. Usually it is called CPanel but there are other tools available.
  2. In the main control panel interface, look for a link or icon link to MySQL Databases. Click the MySQL Databases link.
  3. In the Create a New Database section, type in a name. The name probably should have some complexity rather than be easy to guess. Write this information down.
  4. In the MySQL Users section, add a Username and type in a password. Write this information down.
  5. In the MySQL Users section, the Add User to Database sub section, select your user name and database then click the Add button to add (connect) your user account to your MySQL database.
  6. You will see a screen with privileges for the MySQL database. Select all privileges and save changes.

Update the WordPress Configuration File

With your MySQL username and password information, next update the WordPress configuration file:

  1. When you unzip your WordPress file, in the main (root) folder there is a wp-config-sample.php file. Copy this file and give it the name wp-config.php.
  2. Open the wp-config.php file in a text editor, for example, Notepad++, Notepad, TextWrangler, TextMate. DO NOT open with Word or other software that will change the file.
  3. In the wp-config.php file, change database_name_here to your database name, username_here to your database user name, and password_here to your database password.
  4. In the wp-config.php file, see the put your unique phrase here bits on several lines? Highlight these lines, from AUTH_KEY down to NONCE_SALT. We’re going to copy data from another source then paste over our highlighted lines of text in this file.
  5. Go to https://api.wordpress.org/secret-key/1.1/salt/ in your web browser. Notice how the output looks exactly like the lines of text you highlighted? Except instead of put your unique phrase here there’s lots of letters, numbers, and other characters. Highlight the output from this web page with your mouse and right mouse-click to copy the data.
  6. In the wp-config.php file, right mouse-click to paste the new data over your old highlighted data. You should have only one instance of AUTH_KEY down to NONCE_SALT but with the letters, numbers, and characters instead of put your unique name here text.
  7. Save your changes to the wp-config.php file and close this file.

If you’re wondering, the AUTH_KEY down to NONCE_SALT lines in the wp-config.php file are salt used to encrypt data in your WordPress site. The combinations of letters, numbers, and characters are unique to your configuration file and, therefore, make it harder to hack into parts of your site. It’s called salt because, like salt on food, these bits of data are added into the encryption process to add a bit of randomness.

Configure FTP Software and Connect to Web Hosting Account

Find the confirmation email you received from your web hosting company with the account detail. You’ll need to find the IP address for your new account, as well as the FTP (or account) user name and password. We’ll use this information to connect from your computer to the computer that hosts your website.

While these steps are for Filezilla, a free software tool used to transfer files to remote computers, they should be similar for any FTP software.

To upload your WordPress files to your web hosting account, first connect to your web hosting account:

  1. Open Filezilla and create a new account. Select File > Site Manager and click the New button on the Site Manager popup window.
  2. In the Site Manager popup window, in the left pane type the name for this account.
  3. In the right pane of the Site Manager popup window, type your IP address for the Host field, select Normal for Logon Type, and enter your FTP (or account) user name and password.
  4. Click the Connect button in the Site Manager popup window to save your new account entry then connect to your web hosting account.

Next, copy files from your computer to your remote web hosting account:

  1. In Filezilla, select Transfer > Transfer Type > Auto to ensure your files are copied correctly.
  2. In the left panes in Filezilla, use the buttons and double-click folder icons to browse to your WordPress file folder. You should see a list of WordPress folders and file names, including the wp-config.php file you configured earlier.
  3. In the right panes in Filezilla, use the buttons and double-click folder icons to browse to where you want to install WordPress. If you want to install WordPress in your main (root) folder, double-click the public_html folder or www folder. If you want to install WordPress in a folder within your site, once you are in the public_html or www folder, create a new folder then double-click the new folder.
  4. In the left pane in Filezilla, select all the WordPress folders and files and drag them to right pane and the empty folder to hold your WordPress files. It takes several minutes for all your files to transfer to your remote web server.

Selecting the Auto transfer type lets the FTP software upload files based on the content type detected by the software. If you don’t know, image files are binary files while the wp-config.php and other WordPress files are text (ASCII) files. Each type of file has to be uploaded a specific way digitally for your files to work on your web server.

Point Domain Name to your WordPress Site

The account confirmation email from your web hosting provider should include at least two DNS addresses. Typically they’re in the format NS1.DOMAINSERVERNAME.COM and NS2.DOMAINSERVERNAME.COM. These servers have both the IP address for your computer and the domain name so they can route traffic back and forth to your website. You’ll need the DNS server names for this step.

  1. Go to the online domain registrar where you bought your domain name, log in to their site, and open their control panel where you can manage details about your domain name.
  2. Find then go to the domain name server setup page. With Namecheap.com, the registrar I use, it’s a link called Domain Name Server Setup.
  3. Specify custom DNS configuration and enter the two DNS server names provided by your web hosting company.
  4. Save your changes.

It can take up to 24 hours for your domain name to work in a web browser. And it can take a few minutes even for your domain registrar to show the changes you’ve made. The registrar I use, Namecheap.com, appears to resell Register.com services which offer 15 minute propagation of domain name changes because their computers are on an internet backbone. Other registrars have similar arrangements. Bottomline, expect to wait for this step to work, from a few minutes to hours to a day worst case.

Install WordPress

Once you can access your domain name with a web browser, then install WordPress:

  1. Type in your domain name where you installed WordPress. If you installed the software in your main (root) folder, call up your domain name. If a sub folder like blog, type yourdomain.com/blog to see your site.
  2. WordPress will ask you to create an initial user account. Write the information down or store the information in LastPass or similar password management service.

As you can see, this is the easiest of all the steps. Common problems might involve database configuration. We configured the database name, user name, and password. In rare cases, you might need to update the localhost value in the wp-config.php file. Or the DB_NAME database name value might be funky. In these cases, work with your web hosting support team to finish off this configuration task.

With WordPress, you work with two web addresses or URLs, one for your website and one to use WordPress to maintain your site. You should bookmark both sites to make them easy to find. The administrative URL typically has /wp-admin included after your domain name while your website is at your domain name.

Customize Your WordPress Site

Once you have WordPress installed, you should customize your website with a theme and add plugins to protect your site and add functionality. There are tons of themes and plugins available. And WordPress makes it easy to add themes and plugins. Just click around the WordPress administrative site.

Useful plugins include BackWPup which makes copies of your site database and files periodically to help recover your site if needed. The free Akismet plugin from the makers of WordPress also helps prevent comment spam. There are many other options.

To add a plugin:

  1. Login to your WordPress administration site.
  2. Select Plugins > Add New from the left side of the admin site.
  3. In the Install Plugins page, search for a plugin by name. For example, BackWPUp.
  4. Click the Install Now link next to the plugin item.

To add a theme:

  1. Login to your WordPress administration site.
  2. Select Appearance > Themes from the left side of the admin site.
  3. On the Manage Themes page, click the Add New button next to the page name.
  4. Use Search at the top right to search themes by name. Or browse the themes that appear.
  5. Hover over a theme and select the Install button.

To add content to your new WordPress site:

  1. Login to your WordPress administration site.
  2. Select Posts > Add New from the left side of the admin site.
  3. Enter a title, content, and other data for your post on the Add Post page.
  4. Click the Publish or Update button on the top right side of the Add Post page.

There are hundreds, if not thousands, of things you can do at this point with your WordPress site. Start by sticking to the themes, plugins, and other functionality included and easily found through WordPress. Save coding and tweaking for later when you feel comfortable using FTP. This way you learn the software, anything you publish appears automatically on your site, and you don’t make mistakes that might destroy your site. Best to have fun and learn then go off and take big risks with customization.

You also can find lots of recommendations and articles about how to customize and optimize your WordPress site. And be sure to update your WordPress software when the administration site notifies you (and backup your files and database using a plugin like BackWPup). The links below are the smallest possible set of information about WordPress but a great place to start learning more.

Learn More

WordPress

http://www.wordpress.org
http://www.wordpress.org/download
http://www.wordpress.org/support

WordPress Tutorials

http://codex.wordpress.org/Installing_WordPress
http://wordpress.tv/
https://www.youtube.com/user/wpmudev
http://premium.wpmudev.org/blog/

WordPress Plugins

http://www.wordpress.org/plugins
http://premium.wpmudev.org/

WordPress Themes

http://www.wordpress.org/themes
https://thethemefoundry.com/
http://www.woothemes.com/
http://www.meanthemes.com/

FTP Software

https://filezilla-project.org/

Text Editors

http://www.barebones.com/products/textwrangler/
http://notepad-plus-plus.org/
http://macromates.com/ (TextMate)

Install WordPress on Your Own Computer

http://codex.wordpress.org/Installing_WordPress#Installing_WordPress_on_your_own_Computer

Drupal Publishing Software

https://drupal.org/

ExpressionEngine Publishing Software

http://ellislab.com/expressionengine

Joomla Publishing Software

http://www.joomla.org/

Also In The June 2014 Issue

Codea

Codea is an app designed to make it easy to create games and software. Here are tutorials and links to online resources.

Raspberry Pi Projects

Here's a quick introduction to Raspberry Pi, how to find one, get set up, and then do all sorts of neat projects. With links for each step.

Summer Tech Camps and Local Groups

Summer is a great time to get outdoors, learn technology, and meet people in summer tech camps and local tech groups.

Github Basics

Github is an important tool used by programmers to manage their code projects. Here are Github tutorials with links to learn more.

Create ASCII Art

It's fun and easy to create ASCII art with your computer keyboard, a text editor, and your imagination. Here are ideas to get started.

If you’re not failing 90% of the time, then you’re probably not working on sufficiently challenging problems.

June 2014 Learn More Links

Links from the bottom of all the June/July 2014 articles, collected in one place for you to print, share, or bookmark.

June 2014 News Wire

Interesting stories about computer science, software programming, and technology for the months of June/July 2014.

Robots!

Mindstorms, Sphero, and Robot Turtles engage kids (and families) in playing while also teaching computer science and programming.

Describe an Object, Multiplying Numbers

Computational thinking projects help you to solve problems in ways used to create software, as well as problems in real life.

Count Dots, The Orange Game, Santa’s Dirty Socks

These hands on projects teach computer science concepts without a computer. Plus links to many more projects.