I have a number of developed properties, most hosted at a friends CoLo in San Diego. Since I began working for Rightside, I have been slowly migrating all of my domains over to my Name.com Unbelievable Hosting package. All but one…
My wife has an awesome recipe blog which gets, frankly, more traffic than all of my sites put together. Great food, awesome writing and great pictures (I take credit for those) all combine to a readership that is pretty solid. This was the last domain I planned to move over as it has more impact if there is down time.
Previously when I moved a domain over (like this one you are on right now), I created an Add-On domain in CPanel on Name.com, then did a WordPress export from the old site to the new Name.com site. This was dumb. Lots of issues, lots of data loss. When I decided to move over NomAppetit.com, I needed to be more careful. This article is about that move.
Note: This applies to any CPanel hosting, not just Name.com, but for the price, for unlimited bandwidth, email, disk space and lots of other reasons, I hope you will check out Name….
- The test run space
- In CPanel, choose “SubDomains” under the “Domain” heading.
- Enter a name for your subdomain. DON’T use the name you will use when you do the actual domain. (i.e. I used “na” as my subdomain for NomAppetit.com)
- For the domain to put this on, just choose your main hosting domain. We will be deleting the subdomain eventually anyway
- For the Document Root, put the name you will want the domain to live under. (I used nomappetit for NomAppetit.com)
- Click “Create”
- Getting The DB
- In your existing hosting panel (The one you are moving away from) Go to phpMyAdmin (or whatever tool you are using to backup a DB)
- Backup BOTH structure and data. Include User objects as well.
- Download the .SQL file to your local computer.
- Getting The Files
- In your existing hosting panel (The one you are moving away from) Go to the file manager.
- Select all files from the root of the WordPress installation and all subdirectories
- Download the files. (Often, they will be zipped or .tar.gz’d. This will be out of the scope of this article, but you will need to extract them on your local computer.)
- Alternately, you can simply use FTP to download all of the files to your local computer
- Getting Ready to Push the DB
- In CPanel in your Name.com account, Look for the Database section and click on MySQL Database Wizard.
- Create a DB name that you want to use for the new DB (WRITE THIS DOWN)
- Click “Next”
- Create a db Username and password. (WRITE THIS DOWN)
- Click “Create User”
- Select the checkbox for “All Privileges” and click “Next Step”
- Creating the database
- In the Database section of the main CPanel page, select “phpMyAdmin”
- Locate and select the DB we created in Step 4
- Click on the “Import” tab
- Click the “Choose File” button and locate the .SQL file you saved
- Click “Go”
- Pushing the Files
- We need to update the wp-config.php file. Open it locally in a text editor.
- Change DB_Name to the name you chose in step 4.2
- Change the DB_User to the user you chose in step 4.3
- Change the DB_Password to the user you chose in step 4.3
- Save the file
- Using an FTP client, connect to your hosting on Name.com
- upload the files to the subdirectory you specified in step 1.4
- Configuring DNS
- In the Name.com control panel, locate the domain name we are moving over
- Click on Nameservers.
- If the nameservers are not Name.com, select “Use Default Nameservers” and click “Apply”
- Click on the DNS Records tab on the left
- Create DNS records for *.yourdomainname.com and yourdomainname.com that point to the IP address of your main hosting domain. If you are unsure, look at the DNS records for your main name.com hosting domain and use those.
- Couple thoughts:
- Be sure to remove the files eventually from the other server. In the short term, to ensure you are getting files from Name.com and not your old hosting, just rename index.php on the old hosting and see if the domain still shows the site.
- Once everything is working, you can delete the subdomain we created in step 1.
That is it! After a short amount of time for DNS to update, your site should be running!
IF you have any questions or issues, feel free to hit me up on twitter at @RghtsideSean. Reach out!