Install your website…
Go to the “mojo marketplace” section. Select “One-click Install”.
Select WordPress from the “Blogs & Website Builders” section. You’ll be taken to the “Install“ page. Click the green Install button within the “Do it yourself (FREE)” section. Now, here’s the fun part. Choose the Domain you want to install the WordPress software into. You can install into the root section, but we promised to show you how to do a “clean” install…remember? To do a clean install, you’ll want to install WordPress into a sub-directory. WordPress is made up of hundreds of individual files and installing into a sub-folder keeps the files manageable and neatly placed within their own folder. This lets you host many websites that each have their own sub-directory.
Click the “Check Domain” button. The One-click Installer will check to make sure everything is ready to install your files. The next screen has 2 check boxes. Click “Show advanced options” for more options. I strongly suggest keeping a text file to keep all your important passwords and account info in one place – I use Notepad to do this.
In the “advanced options” section, enter your website name, your administrative Username and password – NEVER EVER use Admin as your username. We strongly suggest you always use strong passwords on everything related to your website. Keep your passwords in the text file you just created. Here are two great password generators Strong Password Generator and Random Password Generator. I try to always use 12 – 16 character passwords with a mix of upper and lower characters, numbers and symbols. Here’s an example a very strong password: ^10dQ;iy+9:i-7af. Don’t try to type it in; just copy and paste. Keep the “Automatically create a new database for this installation” checkbox checked.
Check the “terms and conditions” checkbox. Click Install Now and just sit back and watch the show. You can ignore any popup screens. Just wait for the Orange header to appear that says, “Your install is complete!” and your done…for now.
Click on the “Back to cPanel” button near the top of the page to get back to where you can access your files. Now, go to the “file management” section and select “File Manager”.
The first time you use the File Manager you’ll get a popup dialog like this:
- Show Hidden Files (dotfiles).
- Skip this question, and always open this directory in the future when opening File Manager.
Select “Go” and you will be taken to the file area. You should see about 10 files or so and the sub-folder that was created when you installed WordPress. Familiarize yourself with how to navigate through this section, because the back button won’t work here. You’ll have to navigate using the “Up One Level”, “Back”, and “Forward” buttons.
Because your WordPress installation is currently inside a sub-folder, the URL of your website will look something like this: http://myWebsiteSubFolder/myWebsite.com. Since we want to have the website display in the root position, we have to redirect the browser to a different location. This involves updating the .htaccess file. The .htaccess file is used to configure web servers running the Apache Web Server software. We’re just going to do a simple redirect, but you should get more familiar with .htaccess techniques, tips and tricks, which is beyond the scope of this series.
Back to business…
In order to host your primary domain from a sub-folder, you’ll have to add a few lines of code to your .htaccess file, which you can see only because you checked the “Show Hidden Files” checkbox earlier.
Important: Be sure to edit the .htaccess file that is at the root level (outside of the sub-folder).
Note: there is also a .htaccess file inside the sub-folder, which will be automatically updated later. For now, leave that one alone.
Here’s a great resource that explains the entire process: How to host the Primary Domain from a subfolder. To edit a file in the File Manager, select the file, and then use either the “Edit” or “Code Editor” button at the top of the page (one displays line numbers – the other doesn’t).
Copy and Paste your code into the editor and modify the settings according to the detailed comments. Any line of code that begins with a hashtag (#) is considered a comment and is there to provide clarity and instructions. Comments are overlooked by the computer and skipped over.
This line of code throws off the color coding of the editor:
# Don’t change the following two lines.
Change it to:
# Do not change the following two lines.
The color coding should display normally. You can normally escape an apostrophe with a backslash (don\’t), but that doesn’t work in this instance.
Now that you’ve updated the .htaccess file, your website should redirect properly and your website should display at the root: http://myWebsite.com. If this doesn’t work, go through the .htaccess file line by line and read each instruction very carefully. Chances are you missed something simple. This process should be easy to do.
To be continued…
Stay tuned next week to learn how to add a custom theme to your Website. You’ll also learn how to choose the right child theme for your particular purpose.