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.
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.
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).
Are you ready? We’ll follow these steps to upload your publishing software to your web hosting account:
- Set up the MySQL database and create a user account for the WordPress publishing software.
- Update the WordPress configuration file with the MySQL user account information.
- Use FTP software to connect to your web hosting account and upload your files.
- Update your domain name to route traffic to your WordPress site.
- Use your web browser to install WordPress.
- 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:
- Open up your control panel in a web browser. Usually it is called CPanel but there are other tools available.
- In the main control panel interface, look for a link or icon link to MySQL Databases. Click the MySQL Databases link.
- 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.
- In the MySQL Users section, add a Username and type in a password. Write this information down.
- 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.
- 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:
- When you unzip your WordPress file, in the main (root) folder there is a
wp-config-sample.phpfile. Copy this file and give it the name
- 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.
- In the wp-config.php file, change
database_name_hereto your database name,
username_hereto your database user name, and
password_hereto your database password.
- In the wp-config.php file, see the
put your unique phrase herebits on several lines? Highlight these lines, from
NONCE_SALT. We’re going to copy data from another source then paste over our highlighted lines of text in this file.
- 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 herethere’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.
- 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
NONCE_SALTbut with the letters, numbers, and characters instead of
put your unique name heretext.
- 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:
- Open Filezilla and create a new account. Select File > Site Manager and click the New button on the Site Manager popup window.
- In the Site Manager popup window, in the left pane type the name for this account.
- 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.
- 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:
- In Filezilla, select Transfer > Transfer Type > Auto to ensure your files are copied correctly.
- 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.
- 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.
- 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.
- 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.
- 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.
- Specify custom DNS configuration and enter the two DNS server names provided by your web hosting company.
- 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.
Once you can access your domain name with a web browser, then install WordPress:
- 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.
- 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:
- Login to your WordPress administration site.
- Select Plugins > Add New from the left side of the admin site.
- In the Install Plugins page, search for a plugin by name. For example, BackWPUp.
- Click the Install Now link next to the plugin item.
To add a theme:
- Login to your WordPress administration site.
- Select Appearance > Themes from the left side of the admin site.
- On the Manage Themes page, click the Add New button next to the page name.
- Use Search at the top right to search themes by name. Or browse the themes that appear.
- Hover over a theme and select the Install button.
To add content to your new WordPress site:
- Login to your WordPress administration site.
- Select Posts > Add New from the left side of the admin site.
- Enter a title, content, and other data for your post on the Add Post page.
- 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.