Knowledgebase
Move Your WordPress Site to HostNine
Posted by on 13 November 2013 03:52 PM

For this guide we're going to demystify WordPress a little bit and show you how easy it is to move a WordPress installation from your current host to HostNine. You'll gain an understanding of the basic components of WordPress and see how moving the site is nothing more than a series of simple steps. Let's dig in! 

Note: this tutorial does not apply to sites hosted at WordPress.com. It only applies to sites that run on a standalone version of WordPress as found at WordPress.org.

If your current host is a cPanel host, the easiest thing to do is to allow one of our talented Tech Support Ninja's take care of it for you. Just open a ticket and they'll get it moved over for you. 

WordPress is really nothing more than a collection of properly placed files supported by a MySQL database. All we're going to do is move the files and the database and then tell WordPress where to find the database. For the guide, we're going to use a fictitious site with a domain name of 'yourdomain.tld', where 'yourdomain' is the beginning part of your site's URL and '.tld' is your '.com' or similar.

Backing Up

To back up the site, we're going to use a WordPress plugin called 'WP-DB-Backup' to get a copy of the database, and then use an FTP program to copy the site to your computer. To start backing up your site:

  1. Log in to your WordPress site at your current host at yourdomain.tld/wp-admin
  2. Navigate to Plugins menu on the left-hand side of the screen and then Add New
  3. Search for 'WP-DB-Backup'; the top result should be the correct one

    Install Plugins

  4. Click Install Now, click OK, and then click Activate Plugin
  5. In the Main menu, click Tools and then click Backup
  6. In the Backup Options setting click Save to Server and then click Backup Now! to start the backup process

    Backup Options

  7. Make note of the directory in which the database backup is stored. In our case it is 'wp-content/backup-220fb/'.

We'll need to know the directory path where the backup is stored when we go to restore the database.

FTPing the Files

Now we need to use FTP to download all of the files, including the database backup which is now stored in a file. A good FTP program to use is Filezilla, which you can download at https://filezilla-project.org.

Note: to learn more about how to FTP, where to get to your FTP, and more check out our other Knowledgebase tutorials on FTP here.

To get started FTPin':

  1. Log into FTP on your account at your old web host
  2. Navigate to the directory that contains all of your site files
    Note: when you see 'wp-config.php', you've hit the right directory.
  3. Make sure you grab all of WordPress' files including the .htaccess file and download them to a folder on your Desktop
    Note: .htaccess is often hidden (because it starts with a dot) and so you may have to unhide it first. In FileZilla, click Server and then Force Showing Hidden Files.

Uploading to Your New cPanel Account

We're getting there! It's time to configure your FTP program for your new cPanel account and get logged in.

Note: if you run into a snag on this step, please open a ticket and we'll be glad to get you logged in. 

  1. Open your welcome email and grab your username and the IP of the server your account resides on
  2. Use the IP from the welcome email as the hostname for the FTP, and your cPanel username and password as the login info
  3. Upload the entire contents of your WordPress site into the public_html directory via FTP (make sure that all files were uploaded including .htaccess)

Creating and Importing the Database

We've got the WordPress files moved. Next we need to create a new database in cPanel and import your WordPress database.

  1. Log in to cPanel (using the login details from your welcome email)
    Note: for this guide we're assuming a username of “youruser”. Be sure to use your actual username.
  2. In the Databases section click MySQL® Database Wizard
  3. In the New Database text field type 'wordpress'
    Note: your database name is youruser_wordpress. This is the 'DB_NAME' that you'll need later.
  4. Click Next Step

    Databases

    Create a Database

  5. In the Create Database Users text field type 'wpuser' and then type in a password for your database (make one up)
  6. Write down the password that you used (in this example I used 'aso+rocks!!') and 'youruser_wpuser'; you will need these later for DB_USER and DB_PASSWORD
  7. Click Create User

    Create Database Users

  8. On the next screen tick the box adjacent to ALL PRIVILEGES and then click Next Step

    All Privileges

    The database is ready, but it's empty. We need to import the database that we backed up. For this, we're going to use phpMyAdmin, which is built into cPanel.
  9. Click the Home icon in the top left corner of the cPanel screen
  10. Scroll down to Databases again and click phpMyAdmin
  11. When the phpMyAdmin screen pops up click on your database in the left column where it says 'youruser_wordpress'

    phpMyAdmin

  12. Click Import, located near the top of the page, and then click Browse
  13. Navigate to the same folder that you downloaded your WordPress files into earlier, into 'wp-content' and then click on the Backup folder
  14. Double-click on the file name 'yourwpdatabase_' and then click Go, near the bottom of the page

    Importing into the database

If it succeeded, great! Let's move to the next step. We're almost done. If not, go ahead and open a ticket with our Tech Support Ninja's and they'll ha-cha! the database into place for you.

Hooking It All Up Together

The last step is to tell your WordPress installation about the new database details. For that we're going to use cPanel's own File Manager.

  1. Go back to cPanel's main page and click File Manager
  2. Web Root should already be selected (select it if it's not), so click Go 
  3. Right click on 'wp-config.php'
  4. Click Edit, then Edit again

    Edit

  5. Edit just the MySQL settings so that it matches the values that we wrote down when creating the MySQL database earlier
  6. Click Save Changes and then Close in the top right corner

/** The name of the database for WordPress */

define('DB_NAME', 'youruser_wordpress');

 

/** MySQL database username */

define('DB_USER', 'youruser_wpuser');

 

/** MySQL database password */

define('DB_PASSWORD', 'aso+rocks!!');

 

/** MySQL hostname */

define('DB_HOST', 'localhost');

You can also close the File Manager and any other cPanel windows. We're done! That's it. Your site is ready to go. Once you point your DNS at your account at HostNine, your site will be live. If you need a hand making any of this work, do not hesitate to contact our Tech Support Ninja's. We want to make sure that your move to HostNine is a smooth one.  

 

See also Login URLs You Need to Know, FTP AccessMake a cPanel Account BackupSet Up cPanel MySQL Database and User

(6 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako fusion