Step 1: Make a Local Copy of the Existing WordPress Site Files

The first thing to do is connect to the FTP server which provides access to the files for the existing WordPress installation. Getting an entire site is time consuming and, with any decent FTP client, it’s automated, so I make this step one. Just connect via FTP and sync a directory on your local disk to the document root which contains your live WordPress install. Now, with files, we can move on to other steps.

Step 2: Get a Dump of Your Current WordPress Database

The easiest tool to use here is going to be PHPmyadmin All hosting providers offer this service to their users. Follow these steps to get your existing database exported:

  • Connect to the instance of phpMyAdmin which provides access to the database for your current site. Enter your credentials to log in to the management interface.
  • Select the database for your existing WordPress installation from the list on the left. (in this case my present database name is “craniumstorm”)

1

Click ‘Export’ at the top of the window

2

Ensure that the radio button for the ‘Quick’ export method is selected. Click the ‘Go’ button to download a .sql file containing a dump of your current database table structure along with all of your existing data.

3

Step 3: Change database name and new domain name

Make a copy of downloaded database file and Open the sql file in a text editor like notepad

  1. Find the old database name and replace it with your new database name.
  2. Find your old domain name and replace it with your new domain name.

Save the file.

 

Step 4: Import Your Database

Now you have to reverse the export process to populate your new database.

  1. Log in to the phpMyAdmin interface for the new database.
  2. Select the new database from the list on the left (see Fig. 1, above).
  3. This time, click the ‘Import’ tab at the top of the window.
  4. Now you’ll have to select the file you just downloaded containing your database dump so that you can upload it here. Click the ‘Choose File’ button and locate the .sql file which you have edited with new details.

4

All that’s left for this step is to click the ‘Go’ button to import your data.

Login to your admin panel with your old server Privileges and check is everything is ok.

Step 5: Upload the WordPress Site and Edit Your Configuration

Uploading the entire WordPress site is the next logical step here.

  1. When you’re ready, connect to the FTP host for the new site.
  2. Upload the entire contents of the site to its new home.
  3. Edit your /wp-config.php file to include the correct information for your new database:
    1. // ** MySQL settings – You can get this info from your web host ** //
    2. /** The name of the database for WordPress */
    3. define(‘DB_NAME’, ‘databasename’);
    4. /** MySQL database username */
    5. define(‘DB_USER’, ‘username’);
    6. /** MySQL database password */
    7. define(‘DB_PASSWORD’, ‘somePass’);
    8. /** MySQL hostname */
    9.  define(‘DB_HOST’, ‘localhost’);

This has come up a couple of times now, so I’m going to say here in advance that you should try logging into the admin panel in the new location at this point. If you get in without any problems, go to Settings > Permalinks and click ‘Update Permalinks’ to make sure WordPress updates the .htaccess file.