Knowledgebase Home / Migrate/Importing a WordPress installation

Migrate/Importing a WordPress installation

To migrate a WordPress site, follow the steps below:

Exporting the mySQL database

1. You will need to know the name of the database, which can be found in your wp-config.php file. Locate the lines shown below:

/* MySQL settings */
define( ‘DB_NAME’, ‘database_name’ );
define( ‘DB_USER’, ‘username_here’ );
define( ‘DB_PASSWORD’, ‘password_here’ );
define( ‘DB_HOST’, ‘localhost’ );
define( ‘DB_CHARSET’, ‘utf8’ );

database_name will be the database name. The format will always be with your cPanel username_databasename

2. From inside of cPanel, navigate to phpMyAdmin.

3. Once inside of phpMyAdmin, click on your database located on the left side. Note: If you have multiple databases, you will see the option to expand your username using the + symbol.

4. Once clicked on your database to migrate, you’ll see all of the tables shown in the right pane. At the top, you’ll click “Export”.

5. After clicking export, you’ll see a radio button selected for “quick” – if it is not, please click it. After, click the “go” button. You’ll then have the option to save the .sql file to your desktop or another folder.

Downloading the WordPress files:
1. You will need to navigate to where your WordPress installation is located and copy/download to following files/directories:

DIRECTORIES:
wp-admin
wp-content
wp-includes
FILES:
.htaccess
index.php
wp-activate.php
wp-blog-header.php
wp-comments-post.php
wp-config-sample.php
wp-config.php
wp-cron.php
wp-links-opml.php
wp-load.php
wp-login.php
wp-mail.php
wp-settings.php
wp-signup.php
wp-trackback.php
xmlrpc.php

Importing the database into your new hosting account (or new cPanel account)

1. Create the new database & user
In your cPanel account where you wish to put the new WordPress install, you’ll want to create a new database using the information found in step 1 from your wp-config.php file – database_name (only enter the second part after the underscore). You’ll add this from cPanel > mySQL Databases.

After creating the database, you’ll need to assign a user to it. To add a user, scroll down towards the bottom where you created the database at and you’ll see the option to create a user. You’ll want to use the same username found in the wp-config.php file or create a new one if one doesn’t exist. (username_here – you want to use the value after the underscore). Enter a password (make sure to note the password) and add.

After adding the user, you’ll see the option for permissions – you want to select all permissions, then click add.

2. Upload the files that were downloaded above into the new installation directory – this is typically in the public_html folder. If you are installing in another directory, you’d upload the files into that directory.

After uploading, navigate into the wp-config.php file and locate the entries below:

/* MySQL settings */
define( ‘DB_NAME’, ‘database_name’ );
define( ‘DB_USER’, ‘username_here’ );
define( ‘DB_PASSWORD’, ‘password_here’ );
define( ‘DB_HOST’, ‘localhost’ );
define( ‘DB_CHARSET’, ‘utf8’ );

You will need to edit the variables above to reflect the database name, username & password we created previously.

Import the new mySQL database

For this, you will repeat the steps in reverse that we took to export the database:

1. In phpMyAdmin, highight the new database your created. You’ll see there will not be any tables on the right.

2. At the top, click “Import”. You’ll see the browse button that will allow you to browse to a file. Click browse & locate the file you previously saved containing the .sql extension.

That’s it! Your new WordPress site should now be viewable. If you see any errors, don’t hesitate to open a support ticket with our tech support.

If the steps above listed in this article do not resolve your issue, please feel free to open a support ticket and we’d be happy to take a look.

Our Guiding Principles

  • Provide consistent, stable and reliable web hosting services.
  • Ensure rapid ticket response and quick resolutions to issues.
  • Never saturate or over-provision servers to ensure stability and speed for our customers.
  • Use only high quality enterprise-class hardware to ensure minimal downtime from hardware failures.
  • Provide clear pricing with no hidden fees or gotchas.