How to point a Namecheap domain to Siteground and run WordPress

I normally buy all my domains through Namecheap—they’re relatively cost effective, plus it keeps all my domains in one place.

I host my sites though with Siteground.

Whenever I install WordPress, I go through much the same process. I configure my domains to point to Siteground’s name servers. I create a new area in my webspace for the WordPress files and setup the mySQL database to pull those files.

I almost always forget how to do some part of this process so I’m writing it here for future reference.

If you want to use a registered domain with a different web host and run WordPress, I’ll go through my exact process here step by step so you can refer to it as well if you need to. The specific example will be using Namecheap and Siteground but you can do this with another registrar or host—it’s pretty much the same process.

Okay, let’s get into it.

Step 1: Locate the DNS settings of your hosting provider

The first thing you need to do is to find your new name servers. This is the name servers of the web host your domain will point to.

If your site is going to be hosted with Siteground, you need to head to Siteground and log into your account.

Once logged in, you can find the name servers under My Accounts and then under the Information & Settings tab, Account DNS. This will be the ns1 and ns2 settings.

DNS settings in Siteground
DNS settings in Siteground

Copy those details somewhere.

Step 2: Change the DNS settings of the domain you want to point

Next, log into the admin area of your domain registrar. In my case this is Namecheap.

Go to the domain management settings for the particular domain you want to host and under Nameservers settings, choose Custom DNS and modify the nameservers to the new ones you copied from Siteground.

Modify the Namecheap domain nameservers to Siteground nameservers
Modify the Namecheap domain nameservers to Siteground nameservers

Save the change and navigate back to Siteground.

Note that it can take 24-48 hours for the domain propagation to complete.

Step 3: Create an “Add on” domain in your web host

Next you need to create an “Add-on” Domain in your webspace with the hosting provider you want to use.

Navigate to the cPanel of your web host (i.e. Siteground) and select the option to add an add-on domain.

Add a new add-on domain to Siteground
Add a new add-on domain to Siteground

Enter your domain name as shown without the http://www part. The rest of the information should self-populate and you just need to choose a password and hit Create to create the new add-on domain.

Copy and paste the credentials somewhere you can find them later.

This step will create a folder in your web root public_html folder. You will need to create a database and install WordPress into this folder in order for it to run successfully.

Step 4: Create WordPress database

The rest of these steps can be completed by following the WordPress codex on how to install WordPress manually but I’ll also outline the steps for you below.

 

Step 4.1 Download WordPress

First thing you need to do is download the latest version of WordPress to your hard drive.

Go to https://wordpress.org/download/ hit the big download button and grab the latest copy. This should land in your Downloads folder.

Once the install completes, unzip the file and keep the folder somewhere you can locate it later.

Step 4.2 Create a mySQL database and user

Next you need to create a mySQL database in your webspace.

In Siteground this can be found under the Database section in cPanel.

Create a mySQL database for WordPress in Siteground
Create a mySQL database for WordPress in Siteground

Use the mySQL Database Wizard to create a database name, user and password. Make sure you select the option to give the user you create All Privileges.

Make a note of those credentials for later.

Step 4.3 Edit the WordPress config file with your database details

Go to the folder on your hard drive where you downloaded and unzipped the WordPress files to (i.e. your Downloads folder).

Find the wp-config-sample.php file and rename it to wp-config.php (removing the word “sample”).

Remove "sample" from the WordPress config file name
Remove “sample” from the WordPress config file name

Next you want to edit the file by opening it in a code editor.

Find and enter in the following information you created when you created your database:

Insert the mySQL database information created here and generate secret keys
Insert the mySQL database information created here and generate secret keys

Don’t forget to use the online key generator to generate your secret keys which will make your site harder to hack. You simply copy the random keys generated from that site and paste it into the code editor over the relevant fields.

Once you’ve edited all the details, save the file and close the editor. You’ve now successfully prepared your wordpress files to be uploaded to your server/webhost.

Step 5: Upload WordPress files to the add-on domain folder

The best way to upload the files to your server is via FTP / SFTP.

Filezilla is normally everyone’s favourite FTP client but my antivirus doesn’t like it so although I normally use CuteFTP, this time I’m trying out Transmit with the SFTP protocol.

There’s a great guide explaining how to do this (using Transmit to transfer files to the Siteground server). You will need to access your terminal, generate some keys, upload it to Siteground, add those keys to Transmit and then connect to your site. This all sounds like a lot but if you follow the guide it’s actually pretty straightforward.

Of course you can use your own FTP client and/or not use SFTP if you want but this is the method and application I personally prefer to use.

Once you’re connected to your web space in your FTP client, navigate to the folder where you want to install WordPress and upload the files there. This could be in the root (i.e. examplesite.com) or in a subfolder (e.g. examplesite.com/blog).

Transfer WordPress files to Siteground server using Transmit SFTP
Transfer WordPress files to Siteground server using Transmit SFTP

Step 6: Run the WordPress install script

Once the files have finished uploading, you can run the WordPress install script by navigating to http://mydomainname.com/wp-admin/install.php in your browser.

This should start the WordPress installer.

Here you just need to confirm a few details, choose your login details and BOOM! You are off to the races my friend. Good job, you’ve just installed WordPress on your domain.

Leave a Reply

Your email address will not be published. Required fields are marked *