In This Tutorial:
A hosts file modification is a convenient way to manipulate your computer to force your domain to resolve to a particular IP address. For instance, if you are hosting your website with a third party and plan on building a BoldGrid website at InMotion, you can work on your new website, without affecting what visitors are seeing on your existing website. In this guide, you will learn how to manually install WordPress, how to download, install, and initialize BoldGrid, and how to perform a hosts file modification to build your new website (using your domain) while your domain is not pointed to your server at InMotion Hosting.
Prepare for Install of WordPress
The first thing you will need to do is install WordPress. The instructions below will guide you through downloading, uploading, and extracting the WordPress core files and how to create the database that WordPress will use.
Download WordPress Installation Files
Download the latest version of WordPress from their official site.
NOTE: Be sure to take note of the location where you save the downloaded file. This will be necessary to upload the file from your computer to your InMotion server.
Upload and Extract WordPress Files
NOTE: Be sure to log into cPanel with the user that owns the domain you are going to install WordPress on. If you have not added the domain to your cPanel you can follow the instructions in our guide on how to add an add-on domain in cPanel. Once the domain has been added to cPanel, you may proceed.
Navigate to the File Manager.
WARNING: The extracted files will go into a newly created /wordpress/ folder. You will need to move the files from that folder to your website’s document root directory.
For instance, the document root directory for example.com is:
When the WordPress files are extracted, they will be located in the directory:
In this case, we would simply move them (one directory up) into the /home/exampl3/public_html/ directory.
Create a Database for WordPress
Using the MySQL Database Wizard in cPanel create a new database and database user and then assign that new database user all privileges to the new database.
NOTE: Be sure to save the database name, database user, and the database user’s password. You will need these details later.
Once you have gathered all the necessary components to install WordPress, you will need to make your hosts file modification. This will allow your domain to remain pointed to the third party server (where your existing website is hosted) for visitors, while exclusively allowing you to point the domain to your (InMotion) server, to proceed with installing WordPress and BoldGrid.
Hosts File Modification
In order to proceed with installing WordPress, you will need to access your domain. However, since your domain is not pointed to InMotion’s server, a hosts file modification is necessary. In this section, you will learn how to modify the hosts file for your computer. Simply follow the instructions that match your computer’s operating system.
Open Notepad as administrator.
NOTICE: To do this, locate Notepad within your Start Menu (if it is not already there, you can type notepad into the search box to display it). Then, right-click on the icon and click on Run as administrator.
NOTE: If you are running Windows XP or lower, you do not need to run Notepad as administrator, as this functionality only exists in Vista and up.
After you have Notepad opened and running as administrator, locate your hosts file.
NOTE: While not all Windows versions store it in the same place, it is typically located within the following directory:
If you do not see it there, other possibilities are as follows:
- Windows 95/98/Me C:\Windows\
- Windows NT/2000/XP Pro C:\Winnt\System32\drivers\etc\
- Windows XP Home/Vista/Windows 7 C:\Windows\System32\drivers\etc\
- Windows 8 C:\Windows\System32\drivers\etc\
- Windows 10 C:\Windows\System32\drivers\etc\
Now, open the hosts file in Notepad, by clicking on File, then Open….
NOTICE: Since the hosts file is not a standard .txt file change the drop-down in the bottom right that says Text Documents to instead display All Files(*.*). Then, navigate to the location of your hosts file and double-click on it.
Now that you have your hosts file open, its time to edit it. Within your hosts file, you should see something like the following:
# Copyright (c) 1993-1999 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
# For example:
# 126.96.36.199 rhino.acme.com # source server
# 188.8.131.52 x.acme.com # x client host
IMPORTANT: Be sure to make a backup of your hosts file first! To do so, you may follow these steps:
- In Notepad, click on File and select Save As….
- In the file name, enter something you will remember such as hosts_backup.
- Click Save.
Add the following lines of code to your hosts file:
NOTE: Be sure to replace example.com with your actual domain name and use the actual IP address for your website. If you are not sure which IP address to use you may refer to our guide on How to Find Your Server Shared IP Address in your cPanel.
After making the change, click on File, then Save.
The easiest way to confirm that it worked is to just go to your domain. At this point in the process, you should see a WordPress installation prompt for you to select your language.
If you are still seeing your site as it appears on the server that your DNS is pointed to, your computer may have some cached DNS and you will need to clear it. Luckily, we have an article that can teach you how to do just that:
Mac OS X
Open the Terminal application.
You may either type Terminal in the Spotlight search or navigate to Applications -> Utilities -> Terminal.
Open the hosts file for editing.
In the terminal window you just opened copy/paste the command string below, and press Return.
sudo nano /private/etc/hosts
NOTE: You will be prompted to enter your Mac user’s password, however, you will not see the cursor move. This is normal, simply enter your password and press the Return key when done.
Edit the hosts file by adding these two lines to the bottom of the file:
NOTE: Be sure to replace example.com with your actual domain name. If you are not sure which IP address to use, you may refer to our guide on How to Find Your Server Shared IP Address in your cPanel.
WARNING: Be sure that there is a space between the IP and the URL. Otherwise, the rule will not work.
Save your changes by pressing Control + o on your keyboard then Return to accept the filename.
Exit the editor by pressing Control + x.
IMPORTANT: Be sure to make a backup of your hosts file first! To do so, you may run the following command before making changes to the file:
cp hosts hosts_backup
The easiest way to confirm that it worked is to just go to your domain. At this point in the process, you should see a WordPress installation prompt for you to select your langauage.
If you are still seeing your site as it appears on the server that your DNS is pointed to, your computer may have some cached DNS and you will need to clear it. You may need to flush your Mac’s DNS cache, so copy/paste the command below, into terminal, and press Return.
sudo dscacheutil -flushcache
IMPORTANT: In order to regain access to your existing/old website, you will need to remove the code in your hosts file.
Visit your domain that you uploaded the WordPress files to. Select your desired language. Then, click on Continue to proceed.
Next you will see a list of the requirements for proceeding with the manual installation. Click on Let’s go! to continue.
Fill in each field. This information is necessary in order for WordPress to connect to the database that you have created. Click on Submit when you have completed entering the information.
Next you will see the following message: “All right, sparky!“. This page confirms that you are ready to begin the installation process on the server. Click on Run the install to begin.
Fill in the fields for the site title, username for the administrator, password for the administrator, and the email for the administrator. You also have a check box for Search Engine visibility that, when checked, will discourage search engines from indexing your website (eg. you are beginning to develop the site and you do not want your website to display in search results yet). Click on Install WordPress when you have completed filling in the fields.
You will now have a “Success” screen display. You can log into the WordPress Dashboard by clicking Log in.
Once you have installed WordPress, you can begin to install BoldGrid through the Administrative Dashboard. The following section will guide you through the process of downloading and installing BoldGrid.
Click on the Download BoldGrid icon.
Click on the Download BoldGrid Plugin button to begin the download.
NOTE: Be sure to take note of the location where you save the downloaded file. This will be necessary to install BoldGrid in the WordPress Dashboard.
Hover over Plugins and click on Add New.
Click on Upload Plugin.
Click on Choose File, then navigate to the location of the BoldGrid download file. Select the file and click Open.
Click on the Install Now button.
Click the Activate link to activate BoldGrid.
Once you have installed and activated BoldGrid, you will need to retrieve your BoldGrid Connect Key from your Account Management Panel and then use that Connect Key to initialize BoldGrid. The following section will guide you through the process of initializing BoldGrid.
Retrieve Your BoldGrid Connect Key
Click on the Manage BoldGrid icon.
Click on the View Connect Key link.
Once the pop-up window appears, copy and save your BoldGrid Connect Key.
Activate BoldGrid with Connect Key
Click on the field, paste in the key, then click on Submit.
NOTICE: Once logged in, you will see a field (at the top of the Dashboard) appear that contains instructions on using the Connect Key.
Now that you have completed a hosts file modification, downloaded, uploaded, extracted, and installed WordPress, and downloaded, installed, and initialized BoldGrid, you can now install your first Inspiration to begin building your new website.
When you are ready to launch your site live, you can change your name servers to point to InMotion, so all your visitors can begin to see your new BoldGrid website! Don’t forget that your hosts file needs to be modified again (to remove the code), in order for your computer to be able to access your old/existing website (where your DNS is pointed to).